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

Systemd service provider do not support custom status command

    Details

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

      Environment:
      CentOS 7.1
      Puppet 3.8

    • Template:
    • Story Points:
      1
    • Sprint:
      Client 2016-03-23
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      The puppet service resource type supports attributes 'start', 'stop' and 'status', that, when set, specify commands to start, stop and test the status (running or stopped) of the service. The 'status' attribute was not overriding the default behvavior. With this fix it now does.
      Show
      The puppet service resource type supports attributes 'start', 'stop' and 'status', that, when set, specify commands to start, stop and test the status (running or stopped) of the service. The 'status' attribute was not overriding the default behvavior. With this fix it now does.

      Description

      When use puppet on systems that use systemd to manage services, it's not able to customize the status checking command. The systemd provider can only use systemctl is-active to check the service status. We need to support the ability to customize status command.

      For example, I use puppet to manage ceph service on CentOS7, and I need to use command like `service ceph status mon` to check the service status of ceph monitor. But puppet only use `systemctl is-active mon` to check the service status regardless of the status parameter of service resource in my puppet code:

      service {"ceph-mon":
        ensure  => running,
        start   => "service ceph start mon",
        stop    => "service ceph stop mon",
        status  => "service ceph status mon",
      }
      

      The status parameter above never work correctly cause systemd provider only use `systemctl is-active` command.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                liaopenghui Liao Penghui
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support