Details
Description
service "apache2" do action :enable end
When there are no links, the service is enabled correctly:
btm@btm-mbp-dev:~/devel/platform/btm/cookbooks/service_test$ find /etc/rc* -name '*apache2*'
btm@btm-mbp-dev:~/devel/platform/btm/cookbooks/service_test$ sudo /var/lib/gems/1.8/bin/chef-client
[Fri, 29 Oct 2010 14:37:09 -0700] INFO: Starting Chef Run (Version 0.9.12)
[Fri, 29 Oct 2010 14:37:10 -0700] INFO: service[apache2]: enabled successfully
[Fri, 29 Oct 2010 14:37:10 -0700] INFO: Chef Run complete in 0.894341 seconds
[Fri, 29 Oct 2010 14:37:10 -0700] INFO: cleaning the checksum cache
[Fri, 29 Oct 2010 14:37:10 -0700] INFO: Running report handlers
[Fri, 29 Oct 2010 14:37:10 -0700] INFO: Report handlers complete
btm@btm-mbp-dev:~/devel/platform/btm/cookbooks/service_test$ find /etc/rc* -name '*apache2*'
/etc/rc0.d/K20apache2
/etc/rc1.d/K20apache2
/etc/rc2.d/S20apache2
/etc/rc3.d/S20apache2
/etc/rc4.d/S20apache2
/etc/rc5.d/S20apache2
/etc/rc6.d/K20apache2
However, if links exist, such as if you disable the service with the newly minted 'disable' argument:
btm@btm-mbp-dev:~/devel/platform/btm/cookbooks/service_test$ sudo update-rc.d apache2 disable update-rc.d: warning: apache2 start runlevel arguments (none) do not match LSB Default-Start values (2 3 4 5) update-rc.d: warning: apache2 stop runlevel arguments (none) do not match LSB Default-Stop values (0 1 6) Disabling system startup links for /etc/init.d/apache2 ... Removing any system startup links for /etc/init.d/apache2 ... /etc/rc0.d/K20apache2 /etc/rc1.d/K20apache2 /etc/rc2.d/S20apache2 /etc/rc3.d/S20apache2 /etc/rc4.d/S20apache2 /etc/rc5.d/S20apache2 /etc/rc6.d/K20apache2 Adding system startup for /etc/init.d/apache2 ... /etc/rc0.d/K20apache2 -> ../init.d/apache2 /etc/rc1.d/K20apache2 -> ../init.d/apache2 /etc/rc6.d/K20apache2 -> ../init.d/apache2 /etc/rc2.d/K80apache2 -> ../init.d/apache2 /etc/rc3.d/K80apache2 -> ../init.d/apache2 /etc/rc4.d/K80apache2 -> ../init.d/apache2 /etc/rc5.d/K80apache2 -> ../init.d/apache2 btm@btm-mbp-dev:~/devel/platform/btm/cookbooks/service_test$ find /etc/rc* -name '*apache2*' /etc/rc0.d/K20apache2 /etc/rc1.d/K20apache2 /etc/rc2.d/K80apache2 /etc/rc3.d/K80apache2 /etc/rc4.d/K80apache2 /etc/rc5.d/K80apache2 /etc/rc6.d/K20apache2 btm@btm-mbp-dev:~/devel/platform/btm/cookbooks/service_test$ sudo /var/lib/gems/1.8/bin/chef-client [Fri, 29 Oct 2010 14:38:09 -0700] INFO: Starting Chef Run (Version 0.9.12) [Fri, 29 Oct 2010 14:38:10 -0700] INFO: service[apache2]: enabled successfully [Fri, 29 Oct 2010 14:38:10 -0700] INFO: Chef Run complete in 1.122395 seconds [Fri, 29 Oct 2010 14:38:10 -0700] INFO: cleaning the checksum cache [Fri, 29 Oct 2010 14:38:10 -0700] INFO: Running report handlers [Fri, 29 Oct 2010 14:38:10 -0700] INFO: Report handlers complete btm@btm-mbp-dev:~/devel/platform/btm/cookbooks/service_test$ find /etc/rc* -name '*apache2*' /etc/rc0.d/K20apache2 /etc/rc1.d/K20apache2 /etc/rc2.d/K80apache2 /etc/rc3.d/K80apache2 /etc/rc4.d/K80apache2 /etc/rc5.d/K80apache2 /etc/rc6.d/K20apache2 btm@btm-mbp-dev:~/devel/platform/btm/cookbooks/service_test$
The service is not enabled, even though it claims to be. In the last find, rc[2-5].d should have S20 links not K80 links.
Activity
- All
- Comments
- History
- Activity
- Transitions Summary
http://github.com/btm/chef/tree/CHEF-1794
Fixed indirectly in
CHEF-1794In this case you can see were are all K[ill] links, but the enable gives is S[tart] links.
btm@btm-mbp-dev:~/src/chef/chef$ !1991 find /etc/rc* -name '*apache2*' /etc/rc0.d/K20apache2 /etc/rc1.d/K20apache2 /etc/rc2.d/K80apache2 /etc/rc3.d/K80apache2 /etc/rc4.d/K80apache2 /etc/rc5.d/K80apache2 /etc/rc6.d/K20apache2 btm@btm-mbp-dev:~/src/chef/chef$ !1990 sudo /var/lib/gems/1.8/bin/chef-client [Fri, 29 Oct 2010 14:47:00 -0700] INFO: Starting Chef Run (Version 0.9.13) [Fri, 29 Oct 2010 14:47:00 -0700] INFO: service[apache2]: enabled successfully [Fri, 29 Oct 2010 14:47:01 -0700] INFO: Chef Run complete in 1.015059 seconds [Fri, 29 Oct 2010 14:47:01 -0700] INFO: cleaning the checksum cache [Fri, 29 Oct 2010 14:47:01 -0700] INFO: Running report handlers [Fri, 29 Oct 2010 14:47:01 -0700] INFO: Report handlers complete btm@btm-mbp-dev:~/src/chef/chef$ !1991 find /etc/rc* -name '*apache2*' /etc/rc0.d/K20apache2 /etc/rc1.d/K20apache2 /etc/rc2.d/S20apache2 /etc/rc3.d/S20apache2 /etc/rc4.d/S20apache2 /etc/rc5.d/S20apache2 /etc/rc6.d/K20apache2