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

Puppet run doesn't fail when Systemd fails to start service

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      EL7

    • Template:

      Description

      Lets have Systemd unit file for a simple service, but pass wrong argument to ExecStart command: --foo.

      /usr/lib/systemd/system/ncat.service

      [Unit]
      Description=Ncat
      [Service]
      ExecStart=/bin/ncat --keep-open --listen 5000 --sh-exec 'xargs -n1 echo' --foo
      [Install]
      WantedBy=multi-user.target
      

      Run:

      # puppet apply -e 'service {"ncat": ensure => running }'
      Notice: /Stage[main]/Main/Service[ncat]/ensure: ensure changed 'stopped' to 'running'
      

      Because of the wrong argument the service is not started however puppet finishes successfully.

      The thing is the command systemctl start always exits with 0 exit code no matter the start was successful or not.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              martiner Martin Caslavsky
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support