init: disable spawning for shutdown
It would be very useful to be able to request that Upstart not spawn any new jobs or job instances and also not respawn any existing processes (respawn stanza).
The main use-case scenario for this is shutdown. On Ubuntu, the shutdown is delicate since both Upstart and SystemV jobs have to be handled.
Currently, the script /etc/init.
A solution would appear to be some way to stop Upstart respawning any more processes. A new initctl command such as "initctl disable-spawn" could be introduced to allow existing jobs to finish, but disallow any new jobs or respawns to occur.
initctl disable-spawn # stop any new processes from being created by Upstart
Note that if we make this change, we should expose this setting to allow admins to query it. A better interface might therefore be something like this:
initctl set disable-spawn 1 # disable new processes
initctl get # get all variables
initctl get disable-spawn # get value of disable-spawn variable
If we do *this*, maybe we should allow such syntax in /etc/init.conf?
Note that we should probably *not* allow disabling of spawning for individual jobs since:
1) That can already be handled by changing the .conf / .override file
2) If we allowed "initctl disable-spawn <job>" the .conf/.override file would be out-of-date wrt Upstarts internal state for the job.
|Changed in upstart:|
|importance:||Undecided → Wishlist|
|status:||New → Triaged|
- Add ability to initctl to disable job spawning
+ init: disable spawning for shutdown