[Bug 750141] Re: /etc/init.d/sendsigs should stop Upstart jobs with no stop on condition
James Hunt
750141 at bugs.launchpad.net
Mon Aug 13 14:53:13 UTC 2012
** Description changed:
Binary package hint: sysvinit
- If an Upstart job has no stop on condition, Upstart won't stop any
- instances of it. However, if a job has no stop on, but *does* specify
- respawn we have a potential problem at shutdown since:
+ If an Upstart job has no 'stop on' condition, Upstart won't stop any
+ instances of it.
- - /etc/init.d/sendsigs will attempt to kill the Upstart job PID(s)
- - Upstart will attempt to respawn the job until the respawn limit is reached.
+ However, if a job has no 'stop on', but *does* specify 'respawn' we have
+ a potential problem at shutdown since if that job stops, it will be
+ restarted by Upstart until its respawn limit is reached.
- This bug is to change sendsigs such that it manually stops all Upstart
- jobs with no "stop on" *before* it generates the OMITPIDS list. See
- http://upstart.ubuntu.com/cookbook/#list-all-jobs-with-no-stop-on-
+ Further, if the job does not stop, it will never be killed by sendsigs.
+
+ The solution is to modify the upstart_jobs() function in
+ /etc/init.d/sendsigs to only return PIDS for jobs which *do* have a
+ 'stop on' specified. This can be achieved by feeding the list of jobs to
+ 'initctl show-config' and filtering on those jobs which have no 'stop
+ on' line.
+
+ See http://upstart.ubuntu.com/cookbook/#list-all-jobs-with-no-stop-on-
condition for an example of how to list jobs with no "stop on"
- condition. This could be reworked to call "stop --no-wait $job" *before*
- we generate OMITPIDS from the output of "initctl list".
+ condition.
+
+ The best solution for jobs which do not specify a 'stop on' condition:
+
+ - call "stop --no-wait $job"
+ - do NOT add the associated job processes to OMITPIDS to handle the case where 'stop' fails to stop the jobs in a "reasonable amount of time" (for example for jobs which specify ridiculously large values for 'kill timeout').
** Tags added: upstart-shutdown
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sysvinit in Ubuntu.
https://bugs.launchpad.net/bugs/750141
Title:
/etc/init.d/sendsigs should stop Upstart jobs with no stop on
condition
Status in “sysvinit” package in Ubuntu:
New
Bug description:
Binary package hint: sysvinit
If an Upstart job has no 'stop on' condition, Upstart won't stop any
instances of it.
However, if a job has no 'stop on', but *does* specify 'respawn' we
have a potential problem at shutdown since if that job stops, it will
be restarted by Upstart until its respawn limit is reached.
Further, if the job does not stop, it will never be killed by
sendsigs.
The solution is to modify the upstart_jobs() function in
/etc/init.d/sendsigs to only return PIDS for jobs which *do* have a
'stop on' specified. This can be achieved by feeding the list of jobs
to 'initctl show-config' and filtering on those jobs which have no
'stop on' line.
See http://upstart.ubuntu.com/cookbook/#list-all-jobs-with-no-stop-on-
condition for an example of how to list jobs with no "stop on"
condition.
The best solution for jobs which do not specify a 'stop on' condition:
- call "stop --no-wait $job"
- do NOT add the associated job processes to OMITPIDS to handle the case where 'stop' fails to stop the jobs in a "reasonable amount of time" (for example for jobs which specify ridiculously large values for 'kill timeout').
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/750141/+subscriptions
More information about the foundations-bugs
mailing list