initscript emulation layer fails on start/stop/restart for jobs that don't spawn long lived processes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upstart (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
/lib/init/
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
no longer affects: | null |
Changed in upstart (Ubuntu): | |
status: | New → Confirmed |
tags: | added: natty |
Moved to Ubuntu bug tracker