Activity log for bug #1495853

Date Who What changed Old value New value Message
2015-09-15 08:25:29 Tero Marttila bug added bug
2015-09-15 08:36:43 Tero Marttila bug watch added http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775795
2015-09-15 08:42:53 Tero Marttila summary puppet service enable broken on ubuntu vivid for services shipping sysvinit and systemd support puppet service enable broken on ubuntu vivid with debian provider
2015-09-15 08:45:48 Tero Marttila description Running Puppet on Ubuntu 15.04 Vivid: $ lsb_release -d Description: Ubuntu 15.04 $ apt-cache policy puppet-common puppet-common: Installed: 3.7.2-1ubuntu2 Using the bird package as an example: $ dpkg -L bird | vgrep service unit files /lib/systemd/system/bird.service /lib/systemd/system/bird6.service /etc/init.d/bird6 /etc/init.d/bird /etc/init/bird.conf /etc/init/bird6.conf Puppet appears to choose the debian provider for the bird service, over the systemd provider: $ sudo puppet resource --debug --param provider --param enable service bird Debug: Runtime environment: puppet_version=3.7.2, ruby_version=2.1.2, run_mode=user, default_encoding=UTF-8 ... Debug: /Service[bird]: Provider debian does not support features flaggable; not managing attribute flags ... Debug: Service bird found in both debian and init; skipping the init version ... Debug: /Service[bird.service]: Provider systemd does not support features flaggable; not managing attribute flags ... Debug: Executing '/etc/init.d/bird status' service { 'bird': ensure => 'stopped', enable => 'true', provider => 'debian', } This means that while `ensure => running/stopped` works: $ sudo puppet resource --debug --param provider service bird ensure=stopped Debug: Executing '/etc/init.d/bird status' Debug: Executing '/etc/init.d/bird stop' Notice: /Service[bird]/ensure: ensure changed 'running' to 'stopped' Debug: Finishing transaction 3255100 Debug: Storing state Debug: Stored state in 0.13 seconds Debug: Executing '/etc/init.d/bird status' service { 'bird': ensure => 'stopped', provider => 'debian', } The service `enabled => true/false` state does not: $ sudo puppet resource --debug --param provider service bird enable=false Debug: Executing '/etc/init.d/bird status' Debug: Executing '/usr/sbin/update-rc.d bird disable' Notice: /Service[bird]/enable: enable changed 'true' to 'false' Debug: Finishing transaction 23676980 Debug: Storing state Debug: Stored state in 0.12 seconds Debug: Executing '/etc/init.d/bird status' service { 'bird': ensure => 'stopped', enable => 'false', provider => 'debian', } $ sudo puppet resource --debug --param provider service bird enable=true Debug: Executing '/etc/init.d/bird status' Debug: Executing '/usr/sbin/update-rc.d -f bird remove' Debug: Executing '/usr/sbin/update-rc.d bird defaults' Notice: /Service[bird]/enable: enable changed 'false' to 'true' Debug: Finishing transaction 12984740 Debug: Storing state Debug: Stored state in 0.14 seconds Debug: Executing '/etc/init.d/bird status' service { 'bird': ensure => 'stopped', enable => 'true', provider => 'debian', } $ ls /etc/rc?.d/*bird* /etc/rc0.d/K01bird /etc/rc1.d/K01bird6 /etc/rc3.d/K01bird6 /etc/rc4.d/S02bird /etc/rc6.d/K01bird /etc/rc0.d/K01bird6 /etc/rc2.d/K01bird6 /etc/rc3.d/S02bird /etc/rc5.d/K01bird6 /etc/rc6.d/K01bird6 /etc/rc1.d/K01bird /etc/rc2.d/S02bird /etc/rc4.d/K01bird6 /etc/rc5.d/S02bird $ sudo systemctl is-enabled bird disabled I presume that systemd ignores any sysvinit configuration (/etc/rc?.d/*) for services that have a native systemd unit, and is thus blind to any state inspected/changed by puppet's debian service provider. Workaround is to explcitly use the systemd provider for the service shipping a native systemd service unit: $ sudo puppet resource --debug --param provider --param enable service bird provider=systemd enable=true Warning: Setting manifest is deprecated in puppet.conf. See http://links.puppetlabs.com/env-settings-deprecations Debug: Executing '/bin/systemctl is-active bird' Debug: Executing '/bin/systemctl is-enabled bird' Debug: Executing '/bin/systemctl enable bird' Notice: /Service[bird]/enable: enable changed 'false' to 'true' Debug: Finishing transaction 14759420 Debug: Storing state Debug: Stored state in 0.20 seconds Debug: Executing '/bin/systemctl is-active bird' Debug: Executing '/bin/systemctl is-enabled bird' service { 'bird': ensure => 'stopped', enable => 'true', provider => 'systemd', } $ sudo systemctl is-enabled bird enabled Running Puppet on Ubuntu 15.04 Vivid:  $ lsb_release -d  Description: Ubuntu 15.04  $ apt-cache policy puppet-common  puppet-common:   Installed: 3.7.2-1ubuntu2 Using the bird package as an example, which ships both sysvinit and systemd service files:  $ dpkg -L bird | vgrep service unit files  /lib/systemd/system/bird.service  /lib/systemd/system/bird6.service  /etc/init.d/bird6  /etc/init.d/bird  /etc/init/bird.conf  /etc/init/bird6.conf Puppet appears to choose the debian provider for the bird service, over the systemd provider:  $ sudo puppet resource --debug --param provider --param enable service bird  Debug: Runtime environment: puppet_version=3.7.2, ruby_version=2.1.2, run_mode=user, default_encoding=UTF-8  ...  Debug: /Service[bird]: Provider debian does not support features flaggable; not managing attribute flags  ...  Debug: Service bird found in both debian and init; skipping the init version  ...  Debug: /Service[bird.service]: Provider systemd does not support features flaggable; not managing attribute flags  ...  Debug: Executing '/etc/init.d/bird status'  service { 'bird':    ensure => 'stopped',    enable => 'true',    provider => 'debian',  } This means that while `ensure => running/stopped` works:  $ sudo puppet resource --debug --param provider service bird ensure=stopped  Debug: Executing '/etc/init.d/bird status'  Debug: Executing '/etc/init.d/bird stop'  Notice: /Service[bird]/ensure: ensure changed 'running' to 'stopped'  Debug: Finishing transaction 3255100  Debug: Storing state  Debug: Stored state in 0.13 seconds  Debug: Executing '/etc/init.d/bird status'  service { 'bird':    ensure => 'stopped',    provider => 'debian',  } The service `enabled => true/false` state does not:  $ sudo puppet resource --debug --param provider service bird enable=false  Debug: Executing '/etc/init.d/bird status'  Debug: Executing '/usr/sbin/update-rc.d bird disable'  Notice: /Service[bird]/enable: enable changed 'true' to 'false'  Debug: Finishing transaction 23676980  Debug: Storing state  Debug: Stored state in 0.12 seconds  Debug: Executing '/etc/init.d/bird status'  service { 'bird':    ensure => 'stopped',    enable => 'false',    provider => 'debian',  }  $ sudo puppet resource --debug --param provider service bird enable=true  Debug: Executing '/etc/init.d/bird status'  Debug: Executing '/usr/sbin/update-rc.d -f bird remove'  Debug: Executing '/usr/sbin/update-rc.d bird defaults'  Notice: /Service[bird]/enable: enable changed 'false' to 'true'  Debug: Finishing transaction 12984740  Debug: Storing state  Debug: Stored state in 0.14 seconds  Debug: Executing '/etc/init.d/bird status'  service { 'bird':    ensure => 'stopped',    enable => 'true',    provider => 'debian',  }  $ ls /etc/rc?.d/*bird*  /etc/rc0.d/K01bird /etc/rc1.d/K01bird6 /etc/rc3.d/K01bird6 /etc/rc4.d/S02bird /etc/rc6.d/K01bird  /etc/rc0.d/K01bird6 /etc/rc2.d/K01bird6 /etc/rc3.d/S02bird /etc/rc5.d/K01bird6 /etc/rc6.d/K01bird6  /etc/rc1.d/K01bird /etc/rc2.d/S02bird /etc/rc4.d/K01bird6 /etc/rc5.d/S02bird  $ sudo systemctl is-enabled bird  disabled I presume that systemd ignores any sysvinit configuration (/etc/rc?.d/*) for services that have a native systemd unit, and is thus blind to any state inspected/changed by puppet's debian service provider. Workaround is to explcitly use the systemd provider for the service shipping a native systemd service unit:  $ sudo puppet resource --debug --param provider --param enable service bird provider=systemd enable=true  Warning: Setting manifest is deprecated in puppet.conf. See http://links.puppetlabs.com/env-settings-deprecations  Debug: Executing '/bin/systemctl is-active bird'  Debug: Executing '/bin/systemctl is-enabled bird'  Debug: Executing '/bin/systemctl enable bird'  Notice: /Service[bird]/enable: enable changed 'false' to 'true'  Debug: Finishing transaction 14759420  Debug: Storing state  Debug: Stored state in 0.20 seconds  Debug: Executing '/bin/systemctl is-active bird'  Debug: Executing '/bin/systemctl is-enabled bird'  service { 'bird':    ensure => 'stopped',    enable => 'true',    provider => 'systemd',  }  $ sudo systemctl is-enabled bird  enabled
2015-09-15 10:08:58 Robie Basak bug added subscriber Ryan Harper
2015-09-15 10:09:21 Robie Basak puppet (Ubuntu): assignee Ryan Harper (raharper)
2015-09-15 10:09:25 Robie Basak removed subscriber Ryan Harper
2016-02-16 14:37:43 Launchpad Janitor puppet (Ubuntu): status New Confirmed
2016-02-16 14:37:50 alelindq bug added subscriber alelindq
2016-04-05 13:21:47 Mikko Pesari bug added subscriber Mikko Pesari
2016-04-06 11:59:26 Christian Ehrhardt  puppet (Ubuntu): status Confirmed Fix Released
2016-04-06 11:59:29 Christian Ehrhardt  puppet (Ubuntu): importance Undecided Medium
2016-04-06 11:59:36 Christian Ehrhardt  puppet (Ubuntu): assignee Ryan Harper (raharper)