[Bug 689820] Re: initscript emulation layer fails on start/stop/restart for jobs that don't spawn long lived processes
Thomas Hood
689820 at bugs.launchpad.net
Thu Aug 30 07:55:32 UTC 2012
** Changed in: upstart (Ubuntu)
Status: New => Confirmed
** Tags added: natty
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/689820
Title:
initscript emulation layer fails on start/stop/restart for jobs that
don't spawn long lived processes
Status in “upstart” package in Ubuntu:
Confirmed
Bug description:
/lib/init/upstart-job doesn't perform the requested stop/start/restart
action for Upstart jobs that don't spawn long-lived processes.
For example, qemu-kvm's upstart job doesn't start any daemons, but
rather its pre-start script sets some sysctls and loads kernel
modules, and its post-stop script removes those modules. Its job
scripts never get called when the init script emulation (/etc/init.d,
invoke-rc.d(8)) is used, since no process is associated with the job.
This seems to be the case even in the most recent upstart, in natty
(0.6.6-3).
start|stop|restart)
[...]
PID=$(status "$JOB" 2>/dev/null | awk '/[0-9]$/ { print $NF }')
if [ -z "$PID" ] && [ "$COMMAND" = "stop" ]; then
exit 0
elif [ -n "$PID" ] && [ "$COMMAND" = "start" ]; then
exit 0
elif [ -z "$PID" ] && [ "$COMMAND" = "restart" ]; then
start "$JOB"
exit 0
fi
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/689820/+subscriptions
More information about the foundations-bugs
mailing list