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

systemd provider does not honor documented enabled states

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • PUP 4.5.0, PUP 4.5.1
    • PUP 4.6.0
    • None
    • None
    • 0
    • Client 2016-06-29
    • Bug Fix
    • Hide
      Previously, when checking whether a service was enabled, the systemd provider used hardcoded strings to compare to the output of {{systemctl}}. Now, we use the exit code from {{systemctl}}, which ensures that the provider's view of a service is in line with that of the system.
      Show
      Previously, when checking whether a service was enabled, the systemd provider used hardcoded strings to compare to the output of {{systemctl}}. Now, we use the exit code from {{systemctl}}, which ensures that the provider's view of a service is in line with that of the system.

    Description

      The systemd provider considers too many states as "disabled" and should probably just simply track the return value of "is-enabled" instead of capturing stdout and comparing it to a static list of knows states. This has the added benefit of us not having to externally track new states added to systemd over time.

      This issue was found in puppet-nova's CI where we found that the virtlockd and virtlogd services attempt to be enabled on every run; their "is-enabled" state is "indirect".

      https://www.freedesktop.org/software/systemd/man/systemctl.html
      http://logs.openstack.org/30/308530/24/experimental/gate-puppet-openstack-integration-4-scenario001-tempest-ubuntu-xenial/e209217/console.html#_2016-05-26_22_48_06_290

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cody Cody Herriges
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support