[01:41] I'm a bit confused about what http://upstart.ubuntu.com/cookbook/#restarting-jobs-with-complex-conditions means [01:42] I was under the impression that upstart tracked the state of jobs, and would start jobs when their conditions were met [01:43] would the situation (in that link) be any different if a 'stop on …' was defined? [01:44] would it be any different if 'respawn' was specified? [06:29] bradleyayers: upstart tracks the state of jobs, but it only changes their goal-state on events, not conditions. Its a subtle difference. [06:31] bradleyayers: that section is a bit ambiguous.. I'm going to propose a slight change. [06:32] so say i have a job X that "start on started A and started B", and "stop on stopping A or stopping B". A starts, then B starts, so 'started JOB=B' would be emitted, which would cause X to start right? [06:32] then B changes its goal to stopped, so 'stopping JOB=B' would be emitted, which would cause X to change its goal to stopped, right? [06:33] so then let's say X stops, then B stops [06:33] what happens when i do 'start B' [06:39] * SpamapS draws it in his head [06:40] bradleyayers: it blocks [06:40] bradleyayers: until started A is emitted [06:40] you mean started X? [06:40] no [06:40] :O [06:41] because it is started A and started B ... [06:41] the and blocks [06:41] which is why and's require careful consideration [06:41] oh okay, so B starts fine [06:41] bug #447654 [06:41] but then A stays with its goal as stopped [06:41] aaa [06:41] awit [06:42] !!! [06:42] Z stays with its goal as stopped** [06:42] X [06:42] we had no Z! [06:42] i know :( [06:42] ok [06:42] I'll start again [06:42] yes X stays with its goal as stopped [06:42] B starts properly [06:42] then X stays with its goal as stopped [06:42] and perhaps more importantly, the started event for B is not "finished".. its blocking [06:43] so while B is started, the 'start' command (or event) will be waiting [06:43] There are times where this doesn't matter [06:43] you can use 'and' freely when the events that you are 'and'ing are never waited for [06:44] but how can 'started' ever block, it's an event [06:44] for instance, the 'filesystem' event or the 'net-device-up' events aren't waited on [06:44] bradleyayers: ALL events can block [06:44] it is critical to the proper sequencing of the boot [06:44] http://upstart.ubuntu.com/cookbook/#event-types says Signals don't block [06:45] for instance, the starting event needs to block, so that whatever you're trying to start before, doesn't start until you yourself are started [06:45] which 'started' is [06:45] bradleyayers: signals aren't waited on.. but they actuall do still block.. :-/ [06:45] i should have said: "but how can 'started' ever block, it's a *signal*" [06:45] actually I should say [06:45] ah okay, i didn't realise there was a difference between block and waited on :/ [06:45] my misunderstanding [06:46] started is not a signal [06:46] well it might be actually [06:46] I suppose it is since nothing is waiting for it. [06:46] starting, however, is always waited on [06:47] that's my understanding too [06:47] starting is a 'method event' [06:47] or probably 'hook' [06:49] so back to my original scenario, 'starting B' would be emitted, i dont understand why that doesn't trigger X's condition to be re-evaluated [06:50] i'll read over bug #447654 [06:51] bradleyayers: the condition is evaluated, and B's event satisfies only one side of it. [06:51] bradleyayers: since it is an and, you need to have A's started event *again* [06:52] i see [06:54] bradleyayers: the disconnect that nearly everyone experiences is that they are events, not states, and so are inherently ephemeral. [06:55] yeah :( [06:55] i get it now [06:55] so this definitely hasn't been fixed yet? [06:57] No, it effectively needs a rewrite of the event loop to add the ability to observe states. [06:58] In practice, it can be worked around with the 'wait-for-state' job. [06:59] bradleyayers: is this your bug btw: https://bugs.launchpad.net/upstart-cookbook/+bug/912348 [07:00] yeah that sums up what my question was [07:01] Cool, I just pushed up a merge proposal https://code.launchpad.net/~clint-fewbar/upstart-cookbook/clarify-complex-start-stop/+merge/90379 [07:04] i'd probably bold "is not known to upstart" [07:04] but otherwise it looks good [07:04] but a bit hard to be objective now that I actually understand it [07:12] bradleyayers: agreed on the bolding, pushed that up [07:12] cool [09:26] hey SpamapS thanks for the help before === JanC_ is now known as JanC