If I create a job that looks like this:
manual script sleep 5 end script post-start script sleep 10 end script
Then what I see is these state transitions:
$ dbus-monitor member=StateChanged signal sender=org.freedesktop.DBus -> dest=:1.307 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired string ":1.307" signal sender=:1.0 -> dest=(null destination) serial=712 path=/com/ubuntu/Upstart/jobs/slow_2dpost/_; interface=com.ubuntu.Upstart0_6.Instance; member=StateChanged string "starting" signal sender=:1.0 -> dest=(null destination) serial=713 path=/com/ubuntu/Upstart/jobs/slow_2dpost/_; interface=com.ubuntu.Upstart0_6.Instance; member=StateChanged string "security" signal sender=:1.0 -> dest=(null destination) serial=714 path=/com/ubuntu/Upstart/jobs/slow_2dpost/_; interface=com.ubuntu.Upstart0_6.Instance; member=StateChanged string "pre-start" signal sender=:1.0 -> dest=(null destination) serial=715 path=/com/ubuntu/Upstart/jobs/slow_2dpost/_; interface=com.ubuntu.Upstart0_6.Instance; member=StateChanged string "spawned" signal sender=:1.0 -> dest=(null destination) serial=716 path=/com/ubuntu/Upstart/jobs/slow_2dpost/_; interface=com.ubuntu.Upstart0_6.Instance; member=StateChanged string "post-start" signal sender=:1.0 -> dest=(null destination) serial=719 path=/com/ubuntu/Upstart/jobs/slow_2dpost/_; interface=com.ubuntu.Upstart0_6.Instance; member=StateChanged string "stopping" signal sender=:1.0 -> dest=(null destination) serial=720 path=/com/ubuntu/Upstart/jobs/slow_2dpost/_; interface=com.ubuntu.Upstart0_6.Instance; member=StateChanged string "killed" signal sender=:1.0 -> dest=(null destination) serial=721 path=/com/ubuntu/Upstart/jobs/slow_2dpost/_; interface=com.ubuntu.Upstart0_6.Instance; member=StateChanged string "post-stop" signal sender=:1.0 -> dest=(null destination) serial=722 path=/com/ubuntu/Upstart/jobs/slow_2dpost/_; interface=com.ubuntu.Upstart0_6.Instance; member=StateChanged string "waiting"
The result of not ever going into the running state is that we don't get the "started" signal emitted onto DBus. It seems to me that it was started, and it ran, so the started signal should be emitted.
If I create a job that looks like this:
manual
script
sleep 5
end script
post-start script
sleep 10
end script
Then what I see is these state transitions:
$ dbus-monitor member=StateChanged org.freedesktop .DBus -> dest=:1.307 serial=2 path=/org/ freedesktop/ DBus; interface= org.freedesktop .DBus; member=NameAcquired ubuntu/ Upstart/ jobs/slow_ 2dpost/ _; interface= com.ubuntu. Upstart0_ 6.Instance; member=StateChanged ubuntu/ Upstart/ jobs/slow_ 2dpost/ _; interface= com.ubuntu. Upstart0_ 6.Instance; member=StateChanged ubuntu/ Upstart/ jobs/slow_ 2dpost/ _; interface= com.ubuntu. Upstart0_ 6.Instance; member=StateChanged ubuntu/ Upstart/ jobs/slow_ 2dpost/ _; interface= com.ubuntu. Upstart0_ 6.Instance; member=StateChanged ubuntu/ Upstart/ jobs/slow_ 2dpost/ _; interface= com.ubuntu. Upstart0_ 6.Instance; member=StateChanged ubuntu/ Upstart/ jobs/slow_ 2dpost/ _; interface= com.ubuntu. Upstart0_ 6.Instance; member=StateChanged ubuntu/ Upstart/ jobs/slow_ 2dpost/ _; interface= com.ubuntu. Upstart0_ 6.Instance; member=StateChanged ubuntu/ Upstart/ jobs/slow_ 2dpost/ _; interface= com.ubuntu. Upstart0_ 6.Instance; member=StateChanged ubuntu/ Upstart/ jobs/slow_ 2dpost/ _; interface= com.ubuntu. Upstart0_ 6.Instance; member=StateChanged
signal sender=
string ":1.307"
signal sender=:1.0 -> dest=(null destination) serial=712 path=/com/
string "starting"
signal sender=:1.0 -> dest=(null destination) serial=713 path=/com/
string "security"
signal sender=:1.0 -> dest=(null destination) serial=714 path=/com/
string "pre-start"
signal sender=:1.0 -> dest=(null destination) serial=715 path=/com/
string "spawned"
signal sender=:1.0 -> dest=(null destination) serial=716 path=/com/
string "post-start"
signal sender=:1.0 -> dest=(null destination) serial=719 path=/com/
string "stopping"
signal sender=:1.0 -> dest=(null destination) serial=720 path=/com/
string "killed"
signal sender=:1.0 -> dest=(null destination) serial=721 path=/com/
string "post-stop"
signal sender=:1.0 -> dest=(null destination) serial=722 path=/com/
string "waiting"
The result of not ever going into the running state is that we don't get the "started" signal emitted onto DBus. It seems to me that it was started, and it ran, so the started signal should be emitted.