Please provide a generic method to disable a service at boot time

Bug #582643 reported by Fabio Massimo Di Nitto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upstart
New
Undecided
Unassigned

Bug Description

Hi guys,

it would be very helpful if upstart could provide a generic framework to disable specific services (or events or job or whatever they are called in the upstart world today ;)) at boot time.

Use case:

service foo hangs at boot and prevents machine from completing the boot process.

passing $string_to_be_decided as boot option (easily found in /proc/cmdline) will disable that specific service/initscript from being executed at boot time.

Example:

nfs-server hangs at boot preventing the machine to complete the process.

user adds: "upstart-disable-service=nfs-server" to grub boot menu

nfs-server will not be started at boot (even if this means others services might not be started as dependencies, but at least the boot can complete for recovery, or highly increase the chances to boot).

----

A few considerations:

1) it´s true that it is always possible to boot in recovery mode but that involves already a certain level of expertise to recover. this is a simpler shortcut. It´s not meant to be the "OMG upstart didn´t fix my system".

2) we only need to disable the jobs temporary. Boot with service disable -> fix -> start the service in runlevel X (2/3/4/5 depending on the distribution I guess) to check if it still hangs.

3) i made up the keyword, clearly... i have no strong opinion as long as it´s intuitive :)

4) possible options to pass to the boot keyword could be:

$string_to_be_decided=comma_separated_list_of_services_to_disable

for each service being able to specify the runlevel that should not be executed.

example: string=foo:2,bar:3

5) the difference here with "before" is that we will not break the boot process but keep starting as much as possible, except the listed services.

6) in time, I have seen a few daemons implementing their own buggy versions of those kind of checks in init scripts.. IMHO, one single framework will benefit for everybody and provide one single and consistent behavior.

Revision history for this message
Fabio Massimo Di Nitto (fabbione) wrote :

(ps I was trying to turn the bug into Low priority/wish list but LP doesn´t let me... :))

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.