Issue #7296 has been updated by Tim  Nicholas.

I'm seeing behaviour like the original post: a 'remove' followed by an 
'enable'. 

Unfortunately by the looks of the man page for update-rc.d on ubuntu 10.04, 
says:

<blockquote>
When run with the enable [ S|2|3|4|5 ] options, update-rc.d modifies existing  
runlevel  links  for
the  script  /etc/init.d/name by renaming stop links to start links with a 
sequence number equal to
the positive difference of current sequence number  minus  100,  thus  
returning  to  the  original
sequence number that the script had been installed with before disabling it.
</blockquote>

Which to me, says that it wont create links, only update them. Since all the 
links have been removed by the initial 'remove' command, this doesn't seem to 
be the right command to be running. 

Just as another example, this is what I'm seeing:

<blockquote>
debug: Puppet::Type::Service::ProviderDebian: Executing '/usr/sbin/update-rc.d 
-f nagios-nrpe-server remove'
debug: Puppet::Type::Service::ProviderDebian: Executing '/usr/sbin/update-rc.d 
nagios-nrpe-server enable'
notice: /Stage[main]/Nagios/Service[nagios-nrpe-server]/enable: enable changed 
'false' to 'true'
</blockquote>


<blockquote>
tjn@hostname:~$ sudo /usr/sbin/update-rc.d -f nagios-nrpe-server remove
 Removing any system startup links for /etc/init.d/nagios-nrpe-server ...
tjn@hostname:~$ sudo /usr/sbin/update-rc.d nagios-nrpe-server enable
update-rc.d: warning: nagios-nrpe-server start runlevel arguments (none) do not 
match LSB Default-Start v
alues (2 3 4 5) 
update-rc.d: warning: nagios-nrpe-server stop runlevel arguments (none) do not 
match LSB Default-Stop val
ues (0 1 6)
 System start/stop links for /etc/init.d/nagios-nrpe-server do not exist.
tjn@hostname:~$
</blockquote>

A rather than 'enable', it might be better to use 'defaults', though this will 
put everything with a priority of 20 unless a different priority is specified.

Unfortunately, update-rc.d always seems to exit 0, so there doesn't seem to be 
an easy way to know if this enable has done anything.

----------------------------------------
Bug #7296: Debian service provider disables serivce when set to enable
https://projects.puppetlabs.com/issues/7296

Author: Zach Leslie
Status: Needs Decision
Priority: Normal
Assignee: Nigel Kersten
Category: 
Target version: 
Affected Puppet version: 2.6.7
Keywords: 
Branch: 


<pre>
# echo 'service { "rsyslog": ensure => running, hasstatus => true, enable => 
true; }' | puppet -vd
debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc does not 
exist
debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update does not 
exist
debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl does not 
exist
debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not exist
debug: Puppet::Type::Service::ProviderRedhat: file /sbin/chkconfig does not 
exist
debug: Creating default schedules
debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does 
not exist
debug: Puppet::Type::User::ProviderLdap: true value when expecting false
debug: Puppet::Type::User::ProviderPw: file pw does not exist
debug: Failed to load library 'selinux' for feature 'selinux'
debug: Puppet::Type::File::ProviderMicrosoft_windows: feature microsoft_windows 
is missing
debug: Failed to load library 'ldap' for feature 'ldap'
debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring 
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/private]: Autorequiring 
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring 
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/state/graphs]: Autorequiring 
File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring 
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring 
File[/var/lib/puppet/state]
debug: Finishing transaction 69855713235100
debug: Loaded state in 0.06 seconds
debug: Executing '/etc/puppet/etckeeper-commit-pre'
debug: Loaded state in 0.00 seconds
info: Applying configuration version '1304138816'
debug: Service[rsyslog](provider=debian): Executing 'sh -c LANG=C invoke-rc.d 
rsyslog status | grep -q '^rsyslog.*running''
debug: Puppet::Type::Service::ProviderDebian: Executing '/usr/sbin/update-rc.d 
-f rsyslog remove'
debug: Puppet::Type::Service::ProviderDebian: Executing '/usr/sbin/update-rc.d 
rsyslog enable'
notice: /Stage[main]//Service[rsyslog]/enable: enable changed 'false' to 'true'
debug: Finishing transaction 69855712878060
debug: Storing state
debug: Stored state in 0.02 seconds
notice: Finished catalog run in 3.55 seconds
debug: Executing '/etc/puppet/etckeeper-commit-post'
</pre>

Notice the removal line just before the enable line, which I can only assume is 
the reason the following notice happens on each run.

Ubuntu Lucid
Puppet 2.6.7
Facter 1.5.8


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to