Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-3228

"{}" in systemd service files cause services to fail to start

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 3.6.2
    • Fix Version/s: PUP 4.0.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      Linux using systemd for service initialization

    • Template:

      Description

      This prevents systemd from failing to interpret values correctly. Variables enclosed as "${}" are interpreted by systemd literally.

      examples

      "${PUPPETMASTER_EXTRA_OPTS}":
      [root@c7 vagrant]# systemctl status puppetmaster
      puppetmaster.service - Puppet master
      Loaded: loaded (/usr/lib/systemd/system/puppetmaster.service; disabled)
      Active: failed (Result: exit-code) since Mon 2014-08-25 20:25:02 UTC; 40s ago
      Process: 17658 ExecStart=/usr/bin/puppet master ${PUPPETMASTER_EXTRA_OPTS} --no-daemonize (code=exited, status=1/FAILURE)
      Main PID: 17658 (code=exited, status=1/FAILURE)

      Aug 25 20:25:02 c7.hubspot.local systemd[1]: Started Puppet master.
      Aug 25 20:25:02 c7.hubspot.local puppet[17658]: Error: Could not parse application options: invalid option: --config /etc/puppetmaster/puppet-vagrant.conf --logdest /var/log/puppetmaster.log
      Aug 25 20:25:02 c7.hubspot.local systemd[1]: puppetmaster.service: main process exited, code=exited, status=1/FAILURE
      Aug 25 20:25:02 c7.hubspot.local systemd[1]: Unit puppetmaster.service entered failed state.


      "$PUPPETMASTER_EXTRA_OPTS"
      [root@c7 vagrant]# systemctl status puppetmaster
      puppetmaster.service - Puppet master
      Loaded: loaded (/usr/lib/systemd/system/puppetmaster.service; disabled)
      Active: active (running) since Mon 2014-08-25 20:26:47 UTC; 4s ago
      Main PID: 17873 (puppet)
      CGroup: /system.slice/puppetmaster.service
      └─17873 /usr/bin/ruby /usr/bin/puppet master --config /etc/puppetmaster/puppet-vagrant.conf --logdest /var/log/puppetmaster.log --no-daemonize

      Aug 25 20:26:47 c7.hubspot.local systemd[1]: Started Puppet master.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              tmclaugh Tom McLaughlin
              QA Contact:
              Eric Thompson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support