Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 0.9.14, 0.10.0
-
Fix Version/s: None
-
Component/s: Chef Client
-
Labels:None
Description
Debian 6 (squeeze) uses insserv to perform dependency based booting by scraping requirements from the LSB header in init scripts (provided /etc/init.d/.legacy-bootordering does not exist). It thus overrides update-rc.d. From "update-rc.d-insserv":
# All start/stop/defaults arguments are discarded so emit a
# message if arguments have been given and are in conflict
# with Default-Start/Default-Stop values of LSB comment.
This was discovered in testing CHEF-1407 and a basic insserv provider was written. It inherits the actions for controlling the service from the init provider, and itself provides enable/disable actions. It does not support any way to modify priorities or runlevels with enable or disable.
insserv lacks a feature to describe the current state of a service in respect to it being enabled or disabled, so you must interrogate the links in /etc/rc* directly. This makes writing the code in load_current_resource to determine the state difficult.
insserv does allow you to override runlevels, although it's a bit finicky with its syntax and silently ignores you if you get it wrong. Note that you have to use 'insserv -r SERVICE' to remove these links before you can use 'insserv -d SERVICE' to create the appropriate ones.
btm@btm-mbp-squeeze:~$ sudo insserv apache2,start=5,stop=0,1,2,3,4,6 btm@btm-mbp-squeeze:~$ find /etc/rc* -name '*apache*' /etc/rc0.d/K01apache2 /etc/rc1.d/K01apache2 /etc/rc2.d/K01apache2 /etc/rc3.d/K01apache2 /etc/rc4.d/K01apache2 /etc/rc5.d/S18apache2 /etc/rc6.d/K01apache2
Current workaround seems to be not using the enable/disable actions of the service provider and calling out to insserv as specified above using the execute resource.
I don't believe specifying priorities is going to possible or appropriate with insserv because the boot order is dependency based. If the user wanted to override this boot order, they should use one of the file resource derivatives to create an appropriately named file with a new LSB header in /etc/insserv/overrides.
Activity
- All
- Comments
- History
- Activity
- Transitions Summary