[PUP-3166] Debian service provider on docker with insserv (dep boot sequencing) Created: 2014/09/01  Updated: 2019/04/04  Resolved: 2015/06/01

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: PUP 3.6.2
Fix Version/s: PUP 3.8.2, PUP 4.2.0

Type: Bug Priority: Normal
Reporter: Arthur Leonard Andersen Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: AIO
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Docker Debian 7.4 image but seems to be there for any fresh Debian 7.4 installation.


Issue Links:
Relates
Template:
Story Points: 1
Sprint: Client 2015-04-15, Client 2015-06-10
Release Notes: Bug Fix
QA Contact: Kurt Wall

 Description   

I am trying to test a puppet module in docker. Starting /sbin/init as suggested ...

Each run triggers "reenabling" the defined service, because invoke-rc.d returns 101 (not allowed). In this case puppet should check for the links in /etc/rc*.d manually, as it does for exit code 105.

I attempted to fix this:
https://github.com/puppetlabs/puppet/pull/3038



 Comments   
Comment by Kylo Ginsberg [ 2015/02/24 ]

Merged to master in https://github.com/puppetlabs/puppet/commit/6e6282f1784d315ade33a7077d62a9968abb1403. This will be release in puppet 4.0.0.

Comment by Eric Thompson [ 2015/03/25 ]

Kurt Wall in case you can get to this before me

Comment by Eric Thompson [ 2015/03/25 ]

i'll just leave this here: https://github.com/petems/puppetlabs-inifile/tree/wercker_setup

Comment by John Duarte [ 2015/04/02 ]

Eric Thompson or Kurt Wall have you looked in to reproduction steps on this one?

Comment by Kurt Wall [ 2015/04/02 ]

John Duarte I got sniped by puppet preview work the last few days. I'll get back to this Friday.

Comment by Kurt Wall [ 2015/04/03 ]

@Kylo When you have a moment, can we talk about validating this? I've got a Docker container running Debian. My initial thought is to install puppet, create a module that needs the insserv service, and see if it works. Or maybe even just say puppet apply -e 'service { "insserv": ensure=>running,}'?

Comment by Kurt Wall [ 2015/04/03 ]

Arthur Leonard Andersen Can you supply a complete reproduction case, please? I'd like to validate this fix but want to do so against the case you encountered. Thanks!

Comment by Kurt Wall [ 2015/04/06 ]

After an email/hipchat discussion, Kylo and I decided to validate that the service provider hasn't regressed. It hasn't.

# puppet apply -e "service { 'cron': ensure => stopped }"
Notice: Compiled catalog for kqascu72o57zqcp.delivery.puppetlabs.net in environment production in 0.07 seconds
Notice: /Stage[main]/Main/Service[cron]/ensure: ensure changed 'running' to 'stopped'
Notice: Finished catalog run in 0.24 seconds
root@kqascu72o57zqcp:~# ps -ef | grep cron
root     18903 11948  0 11:16 pts/0    00:00:00 grep cron
# puppet apply -e "service { 'cron': ensure => running }"
Notice: Compiled catalog for kqascu72o57zqcp.delivery.puppetlabs.net in environment production in 0.07 seconds
Notice: /Stage[main]/Main/Service[cron]/ensure: ensure changed 'stopped' to 'running'
Notice: Finished catalog run in 0.06 seconds
# ps -ef | grep cron
root     19117     1  0 11:16 ?        00:00:00 /usr/sbin/cron
root     19119 11948  0 11:16 pts/0    00:00:00 grep cron
# puppet resource service cron
service { 'cron':
  ensure => 'running',
  enable => 'true',
}

Comment by Eric Thompson [ 2015/04/06 ]

cool. normally i'd say that if this were a regression candidate that we should write an acceptance test for this, but since we don't have docker infra, maybe not.

Comment by Peter Huene [ 2015/05/26 ]

Reopening this ticket to target the fix into the 3.8 branch. This has already been fixed for 4.x, so additional functional review will be limited to the 3.x branch.

Comment by Stefan Andres [ 2015/05/26 ]

You can also easily reproduce it if you use https://github.com/devopsconsulting/puppet-disablestart on your system which just places a /usr/sbin/policy-rc.d file which exits with 101.
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/service/debian.rb#L35 can then be used to check if the service is falsely disabled or not.

Comment by Kurt Wall [ 2015/05/28 ]

Assigning to myself, but leaving closed, to investigate the repro case suggested by Stefan Andres. Thanks Stefan!

Comment by Kylo Ginsberg [ 2015/05/28 ]

Crud. I mis-jira'd last night. I didn't mean to close but to move to Ready for Test, so fixing that now. Thanks for picking this up Kurt Wall

Generated at Sun Apr 21 17:56:02 PDT 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.