[PUP-6370] systemd provider does not honor documented enabled states Created: 2016/05/27  Updated: 2017/02/01  Resolved: 2017/02/01

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: PUP 4.5.0, PUP 4.5.1
Fix Version/s: PUP 4.6.0

Type: Bug Priority: Major
Reporter: Cody Herriges Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
is cloned by PUP-7163 regression - systemd provider does no... Accepted
Relates
relates to PUP-5353 Statically-enabled systemd service is... Closed
Template:
Story Points: 0
Sprint: Client 2016-06-29
Release Notes: Bug Fix
Release Notes Summary: 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



 Comments   
Comment by Emilien Macchi [ 2017/02/01 ]

We are seeing this issue again:
http://logs.openstack.org/15/424915/7/check/gate-puppet-openstack-integration-4-scenario001-tempest-ubuntu-xenial/079ed52/logs/puppet.txt.gz#_2017-02-01_22_21_33

version: puppet-agent 1.9.0-1xenial

Comment by Emilien Macchi [ 2017/02/01 ]

Closing it, and using PUP-7163 (clone) for this regression.

Generated at Fri Dec 13 21:03:38 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.