Comment 1 for bug 1495853

Revision history for this message
Tero Marttila (terom-u) wrote : Re: puppet service enable broken on ubuntu vivid for services shipping sysvinit and systemd support

Note that the same scenario behaves correctly under Debian jessie, with the patched debian service provider in version 3.7.2-3:

 https://bugs.debian.org/775795

Similar example on a Debian jessie system:

 $ sudo lsb_release -d
 Description: Debian GNU/Linux 8.2 (jessie)
 $ apt-cache policy puppet
 puppet:
   Installed: 3.7.2-4
   Candidate: 3.7.2-4
   Version table:
  *** 3.7.2-4 0
  500 http://apt/debian/ jessie/main amd64 Packages
  100 /var/lib/dpkg/status
 $ dpkg -L bird | vgrep ...
 /etc/init/bird.conf
 /etc/init/bird6.conf
 /etc/init.d/bird
 /etc/init.d/bird6
 /lib/systemd/system/bird.service
 /lib/systemd/system/bird6.service

 $ sudo puppet resource --debug --param provider --param enable service bird
 Debug: Executing '/usr/sbin/service bird status'
 Debug: Executing '/bin/systemctl show -pSourcePath bird'
 Debug: Executing '/bin/systemctl is-enabled bird'
 service { 'bird':
   ensure => 'running',
   enable => 'true',
   provider => 'debian',
 }
 $ sudo puppet resource --debug --param provider --param enable service bird enable=false
 Debug: Executing '/usr/sbin/service bird status'
 Debug: Executing '/bin/systemctl show -pSourcePath bird'
 Debug: Executing '/bin/systemctl is-enabled bird'
 Debug: Executing '/bin/systemctl disable bird'
 Notice: /Service[bird]/enable: enable changed 'true' to 'false'
 Debug: Finishing transaction 16554200
 Debug: Storing state
 Debug: Stored state in 0.29 seconds
 Debug: Executing '/usr/sbin/service bird status'
 Debug: Executing '/bin/systemctl show -pSourcePath bird'
 Debug: Executing '/bin/systemctl is-enabled bird'
 service { 'bird':
   ensure => 'running',
   enable => 'false',
   provider => 'debian',
 }
 $ sudo puppet resource --debug --param provider --param enable service bird enable=true
 Debug: Executing '/usr/sbin/service bird status'
 Debug: Executing '/bin/systemctl show -pSourcePath 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 18953360
 Debug: Storing state
 Debug: Stored state in 0.21 seconds
 Debug: Executing '/usr/sbin/service bird status'
 Debug: Executing '/bin/systemctl show -pSourcePath bird'
 Debug: Executing '/bin/systemctl is-enabled bird'
 service { 'bird':
   ensure => 'running',
   enable => 'true',
   provider => 'debian',
 }