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

Systemd / Init: Service provider inconsistently picked when querying or changing SysVinit services

    XMLWordPrintable

Details

    • Night's Watch

    Description

      In EL7 (and possibly other platforms), Puppet chooses different service providers when just querying a service and when actually changing it. Example:

      [root@ebdj2qy9lc1axzg puppet]# bundle exec puppet resource service logstash --param provider
      service { 'logstash':
        ensure   => 'stopped',
        enable   => 'true',
        provider => 'redhat',
      }
       
      [root@ebdj2qy9lc1axzg puppet]# bundle exec puppet resource service logstash enable=true --param provider
      service { 'logstash':
        ensure   => 'stopped',
        enable   => 'true',
        provider => 'systemd',
      }
      

      Notice that Puppet switches to the systemd provider when altering the service, but uses the RedHat provider when simply querying it. Note that logstash as a sysvinit service with no unit file. The systemd provider is used consistently on regular systemd services with unit files.

      Attachments

        Activity

          People

            Unassigned Unassigned
            whopper William Hopper
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Zendesk Support