/srv/irclogs.ubuntu.com/2008/03/20/#upstart.txt

mdalesis it possible to have upstart start job b if job a failed?12:01
Keybukyes12:10
keesjhi12:19
Keybukmdales: the stopping and stopped events have arguments saying that it failed, what failed and why12:21
mdalesah, excellent12:21
mdalesis that in the version that's in gutsy?12:21
mdalesI was reading up on jobfailedevent, but I assume that's not there at the moment.12:22
mdalesthanks for the info12:22
Keybukit's there12:23
Keybukjob-failed-event was implemented in 0.3.x12:23
mdalesah12:23
mdalesw00t12:23
keesjI have a job that was started and exite sucessfully , it is not a rewawn job , but I would like the job to remain in "start(ed)" status or at least would like to know that is was started 12:33
keesj(I currently have a while sds ; sleep 10 ;  to keep it running 12:33
KeybukI'm not sure I follow12:53
keesj:P12:54
Keybukyou have a job12:55
Keybukand you want that job to always be running?12:55
keesjwhat I really want to know is if is was stated regardless of whether it is still running12:56
Keybukif it was started, the goal will always be start?12:56
keesjmuch like the mount-kernel-filesystem job12:57
Keybukusual way for that kind of thing is to put the work in the pre-start bit of the job12:57
keesjKeybuk: what is the "goal" of a job?12:57
Keybukspore scott% sudo status tty112:58
Keybuktty1 (start) running, process 457612:58
Keybukthe goal is start, which means Upstart will attempt to keep the job running12:58
Keybukif the goal is stop, Upstart will attempt to keep the job _from_ running12:58
Keybukgoal is changed to start by events or manual command12:58
Keybukgoal is changed to stop by events, manual command and the main process exiting (unless respawn and not normal exit)12:59
keesjyes but I don't want it to be running, even if I call start mount-kernel-filesystems12:59
Keybukjdong: I was thinking about whether there should be the option of "sticky" jobs13:00
Keybukthat stayed running even after the process exited13:00
Keybukbut I couldn't decide whether that was any different from what you were doing, and just doing the work in pre-start13:00
keesjafter that (because the jobs is no respawn) the status is stop13:00
keesjI would like it to be something else  :p13:00
Keybukrespawn would keep it at start13:01
Keybuk(though you would still get stopping/stopped/starting/started events each time it exited)13:01
keesjbut I don't want that. I want the job to finish gracefully and the status to remain on something else then "stopped"13:02
Keybukthe best way to do that is to put your "job" in pre-start13:02
Keybukit'll be run when you start the job, and the job will stay in running (since there's no script/exec) until otherwise stopped 13:02
keesjthe that sounds very sexy!13:03
keesjlet me try that!13:03
Keybukit's an interesting pattern13:09
keesjI can not say how happy I am ! it is working!13:27
keesjwell kinda ...13:37
keesjapparently I can not simply start such a service using emit (with no --no-wait) 13:40
keesjperhaps it is missing some events13:40
Keybukstart?13:40
* Keybuk really must fix that confusion13:40
Keybukif you have /etc/event.d/foo13:41
Keybukthen the right way to start it is just "start foo"13:41
Keybukemit foo won't do anything unless foo has "start on foo" in its job definition13:41
keesjyes , I have things like start on start_boot_mode_select13:47
keesjalso with start foo I have to use --no-wait, , I am using 0.3.814:02
=== kylem_ is now known as kylem
=== keesj_ is now known as keesj

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!