Jira (PUP-9935) service_provider for debian wrong on buster

0 views
Skip to first unread message

Tobias Wolter (JIRA)

unread,
Aug 1, 2019, 9:01:07 AM8/1/19
to puppe...@googlegroups.com
Tobias Wolter created an issue
 
Puppet / Bug PUP-9935
service_provider for debian wrong on buster
Issue Type: Bug Bug
Affects Versions: PUP 6.7.2
Assignee: Unassigned
Components: Catalog Application
Created: 2019/08/01 6:00 AM
Labels: debian
Priority: Major Major
Reporter: Tobias Wolter

Puppet Version: 6.7.2
Puppet Server Version: n/a
OS Name/Version: Debian 10

Services cannot be managed correctly on Debian buster because the `service_provider` code does not consider buster a systemd distribution.

Desired Behavior:

Puppet using systemd.

Actual Behavior:

```
Debug: Executing: '/usr/sbin/service puppet status'
dpkg: error: --compare-versions takes three arguments: <version> <relation> <version>

Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !
Debug: Executing: '/usr/sbin/update-rc.d -f puppet remove'
Debug: Executing: '/usr/sbin/update-rc.d puppet stop 00 1 2 3 4 5 6 .'
Error: Execution of '/usr/sbin/update-rc.d puppet stop 00 1 2 3 4 5 6 .' returned 1: update-rc.d: error: unable to read /etc/init.d/puppet
Error: /Stage[main]/Profile::Base/Service[puppet]/enable: change from 'true' to 'false' failed: Execution of '/usr/sbin/update-rc.d puppet stop 00 1 2 3 4 5 6 .' returned 1: update-rc.d: error: unable to read /etc/init.d/puppet
```

The cause is following code in `/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/systemd.rb`:
defaultfor :operatingsystem => :debian, :operatingsystemmajrelease => ["8", "stretch/sid", "9", "buster/sid"]

This should not be a whitelist anymore. IMHO, it should be set as the Debian default, especially as PE 2018.1, as the oldest still supported version, has a minimum OS requirement of Debian 8 ('jessie') for the agent, which is a systemd distribution.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Tobias Wolter (JIRA)

unread,
Aug 1, 2019, 9:02:03 AM8/1/19
to puppe...@googlegroups.com
Tobias Wolter updated an issue
Change By: Tobias Wolter
*Puppet Version:* 6.7.2
*Puppet Server Version:* n/a
*OS Name/Version:* Debian 10


Services cannot be managed correctly on Debian buster because the `service_provider` code does not consider buster a systemd distribution.

*Desired Behavior:*

Puppet using systemd.

*Actual Behavior:*

``` {code}
Debug: Executing: '/usr/sbin/service puppet status'
dpkg: error: --compare-versions takes three arguments: <version> <relation> <version>

Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !
Debug: Executing: '/usr/sbin/update-rc.d -f puppet remove'
Debug: Executing: '/usr/sbin/update-rc.d puppet stop 00 1 2 3 4 5 6 .'
Error: Execution of '/usr/sbin/update-rc.d puppet stop 00 1 2 3 4 5 6 .' returned 1: update-rc.d: error: unable to read /etc/init.d/puppet
Error: /Stage[main]/Profile::Base/Service[puppet]/enable: change from 'true' to 'false' failed: Execution of '/usr/sbin/update-rc.d puppet stop 00 1 2 3 4 5 6 .' returned 1: update-rc.d: error: unable to read /etc/init.d/puppet
``` {code}

The cause is following code in `/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/systemd.rb`:
  defaultfor :operatingsystem => :debian, :operatingsystemmajrelease => ["8", "stretch/sid", "9", "buster/sid"]

This should not be a whitelist anymore. IMHO, it should be set as the Debian default, especially as PE 2018.1, as the oldest still supported version, has a minimum OS requirement of Debian 8 ('jessie') for the agent, which is a systemd distribution.

Tobias Wolter (JIRA)

unread,
Aug 1, 2019, 9:03:09 AM8/1/19
to puppe...@googlegroups.com
The cause is following code in ` * /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/systemd.rb ` * :
{code}
  defaultfor :operatingsystem => :debian, :operatingsystemmajrelease => ["8", "stretch/sid", "9", "buster/sid"]
{code}

This should not be a whitelist anymore. IMHO, it should be set as the Debian default, especially as PE 2018.1, as the oldest still supported version, has a minimum OS requirement of Debian 8 ('jessie') for the agent, which is a systemd distribution.

Rob Braden (JIRA)

unread,
Aug 5, 2019, 12:38:03 PM8/5/19
to puppe...@googlegroups.com
Rob Braden updated an issue
Change By: Rob Braden
Team: Night's Watch

Josh Cooper (JIRA)

unread,
Aug 14, 2019, 5:52:03 PM8/14/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 6.8.0

Josh Cooper (JIRA)

unread,
Aug 14, 2019, 5:52:04 PM8/14/19
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages