2014-02-07 22:47:45 |
Ted Gould |
description |
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:
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. |
|