Jira (PUP-10963) Puppet service provider incorrectly detected for Ubuntu during OS installation

12 views
Skip to first unread message

Matt Fields (Jira)

unread,
Mar 11, 2021, 11:04:03 PM3/11/21
to puppe...@googlegroups.com
Matt Fields created an issue
 
Puppet / Bug PUP-10963
Puppet service provider incorrectly detected for Ubuntu during OS installation
Issue Type: Bug Bug
Affects Versions: PUP 6.21.1
Assignee: Unassigned
Created: 2021/03/11 8:03 PM
Priority: Normal Normal
Reporter: Matt Fields

Puppet Version: 6.21.1
Puppet Server Version: N/A
OS Name/Version: Ubuntu 18.04 and 20.04

Executing `puppet resource service puppet enable=true` during the Ubuntu install process will incorrectly use the `debian` provider instead of the `systemd` provider, causing the command to fail. 

This command is commonly used in provisioning scripts to enable puppet, and having the command fail leaves puppet disabled after provisioning. 

Desired Behavior: The service is enabled

Actual Behavior: An error occurs and the service is not enabled

 

Here is the syslog output from the installer when it runs the command:

Mar 12 03:37:23 in-target: [[1;31mError: Execution of '/usr/sbin/update-rc.d puppet defaults' returned 1: update-rc.d: error: unable to read /etc/init.d/puppet[[0m
Mar 12 03:37:23 in-target: ^[[1;31mError: /Service[puppet]/enable: change from 'false' to 'true' failed: Execution of '/usr/sbin/update-rc.d puppet defaults' returned 1: update-rc.d: error: unable to read /etc/i
nit.d/puppet^[[0m
Mar 12 03:37:23 in-target: Running in chroot, ignoring request.
Mar 12 03:37:23 in-target: service { 'puppet':
Mar 12 03:37:23 in-target: enable => 'false',
Mar 12 03:37:23 in-target: provider => 'debian',
{{Mar 12 03:37:23 in-target: }}}

 

It looks like this was recently attempted to be fixed back in Feb: https://github.com/puppetlabs/puppet/commit/27957cf25a894cd604309857c32b2b8fe3fac9d7

 

Note that once the OS boots properly, the command works as intended. It is only during the installation shell that it fails. 

 

Noticed by Foreman users around March 1: https://community.theforeman.org/t/puppet-agent-disabled-after-build-process/22605

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Josh Cooper (Jira)

unread,
Mar 12, 2021, 3:00:03 PM3/12/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
*Puppet Version:* 6.21.1
*Puppet Server Version:* N/A
*OS Name/Version:* Ubuntu 18.04 and 20.04


Executing `puppet resource service puppet enable=true` during the Ubuntu install process will incorrectly use the `debian` provider instead of the `systemd` provider, causing the command to fail. 

This command is commonly used in provisioning scripts to enable puppet, and having the command fail leaves puppet disabled after provisioning. 

*Desired Behavior:* The service is enabled

*Actual Behavior:* An error occurs and the service is not enabled

 

Here is the syslog output from the installer when it runs the command:

{ { noformat}
Mar 12 03:37:23 in-target: ^[[1;31mError: Execution of '/usr/sbin/update-rc.d puppet defaults' returned 1: update-rc.d: error: unable to read /etc/init.d/puppet^[[0m }}
{{ Mar 12 03:37:23 in-target: ^[[1;31mError: /Service[puppet]/enable: change from 'false' to 'true' failed: Execution of '/usr/sbin/update-rc.d puppet defaults' returned 1: update-rc.d: error: unable to read /etc/
i}}
{{nit
init .d/puppet^[[0m }}
{{ Mar 12 03:37:23 in-target: Running in chroot, ignoring request. }}
{{ Mar 12 03:37:23 in-target: service { 'puppet': }}
{{ Mar 12 03:37:23 in-target: enable => 'false', }}
{{ Mar 12 03:37:23 in-target: provider => 'debian', }}
{{ Mar 12 03:37:23 in-target: }

{noformat
} }

 

It looks like this was recently attempted to be fixed back in Feb: [https://github.com/puppetlabs/puppet/commit/27957cf25a894cd604309857c32b2b8fe3fac9d7]

 

Note that once the OS boots properly, the command works as intended. It is only during the installation shell that it fails. 

 

Noticed by Foreman users around March 1: https://community.theforeman.org/t/puppet-agent-disabled-after-build-process/22605

Damon Maria (Jira)

unread,
Apr 14, 2021, 10:26:02 PM4/14/21
to puppe...@googlegroups.com
Damon Maria commented on Bug PUP-10963
 
Re: Puppet service provider incorrectly detected for Ubuntu during OS installation

Can confirm same issue during Preseed install using same Puppet version

I tried setting the provider (puppet resource service puppet enable=true provider=systemd) but that resulted in:

 Error: /Service[puppet]: Provider systemd is not functional on this host

This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Ciprian Badescu (Jira)

unread,
Jun 15, 2021, 4:48:01 AM6/15/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages