/srv/irclogs.ubuntu.com/2013/11/26/#upstart.txt

xnoxSegFaultAX: can you file a bug against upstart with example process that does that?02:21
adrien_owwis there a difference between writing "start on started B" in event.d/A and writing "start on starting A" in event.d/B?11:04
xnoxadrien_oww: yes. if jobA.conf has "start on started B" then jobA will be automatically attempted to be started when jobB is fully started & running. and it doesn't matter how jobB has started (manually or automatically)11:49
xnoxadrien_oww: if jobB.conf has "start on starting A", then just before jobA is attempted to be started it will be blocked until jobB fully starts.11:50
xnoxin practice, you'd need additional stanzas in either of them to be automatically started, unless you intend to only start them manually.11:51
xnoxthis does not convey "state", since e.g. in "started B" case i can do manually start job A without having started job B.11:52
xnoxin "start on starting A" case I can manually start job B and job A will not start.11:52
xnoxadrien_oww: if B must be running, before A's main process is started, make sure in A pre-start script a check is made that B's state is correct. e.g. status B | grep -q start/running11:55
adrien_owwright, I see, thanks12:52
adrien_owwthese scripts should only be started at boot so it won't matter much iiuc12:52
adrien_owwthis is a fairly old codebase (well, up to 3-4 years) with an upstart 0.3.3 and I'm trying to start a process earlier on without changing too many things but I must have a line wrong12:53
xnoxadrien_oww: i see. well, 0.3.3 sounds rather very old. I'd recommend upgrading if that is at all possible =) in recent upstarts there is an initctl2dot which can parse jobs and draw a diagram of all jobs and which ones are started when.13:15
xnoxstart with your startup event (the default one is "startup") and trace it to your jobs, and see what things are blocking what.13:16
adrien_owwunfortunately, moving away from 0.3.3 is not possible; I know there are some kludges hidden and some of them will break with a newer upstart13:16
xnoxunderstand.13:17
adrien_owwI have a fairly good idea of what gets to run after what but that's mostly because there is little parallelization ='( 13:17
xnoxadrien_oww: one should be able to increasing debugging. "--debug" should work, and then collect all logs, which should list all the jobs in order, it should be then easier to analyse where the bottlenecks are.13:17
adrien_owwI've checked my commits and I don't understand why the service doesn't seem to get started; that said it might be because I'm looking at syslog (started with --verbose on the kernel command-line) and rsyslogd isn't started yet13:18
xnoxcheck console & dmesg as well.13:18
xnox / kmsg13:19
adrien_owwI'm tempted to be a bit dirty and start on started rsyslogd :D 13:20
adrien_owwit's almost as soon as I want it too13:21
adrien_owwotherwise, in dmesg, there isn't much infos13:22
adrien_owwhmm, had to stop a bit and now getting back on this issue16:25
adrien_owwI have a script X which "start on started Y"; Y is "start on started rsyslogd" and correctly starts16:26
adrien_owwbut X never starts; Y is an abstract job16:27
adrien_owwif I check the status, I get "Y (start) starting" and "X (stop) waiting"16:28
adrien_owwand if I "initctl emit started Y", X is triggered16:28
adrien_owwthe only issue I can think of is that Y is an abstract job but I can't find a confirmation in the doc; however that might only be an issue with older upstart version16:29
adrien_owws16:29
adrien_owwarf, actually Y has a "script" section16:41
xnoxadrien_oww: can you paste full script? if it e.g. has task stanza, started is only emitted once script is completed & exited.16:55
adrien_owwI think I need to clean things up a bit, both on disk and in my mind17:01
adrien_owwbut if a job is stuck in "starting" then it means it's waiting on something that is "start on starting $it", right?17:02
adrien_owwah and upstart 0.3.11, not 0.3.317:07
xnoxadrien_oww: "A (start) starting", means that "starting A" event was emitted; and "started A" was not.17:19
xnoxadrien_oww: checkout http://upstart.ubuntu.com/cookbook/ it lists all states (reported by status) and which events are emitted when, and which transitions happen when.17:20
xnoxit is a useful reference when things are entangled.17:20
xnox(cookbook did not exist back in the day....)17:21
adrien_owwI've checked the cookbook and I can't what could make it never move from "starting" to "started"; the only thing I can think of is that there is one job with "start on starting the-process-that-stays-in-starting-state" and which is not completing17:25
adrien_owwhowever the only one like that is redis-server and it does nothing but call the script in /etc/init.d/, the redis-server is wroking and its state is "redis-sever (start) running"17:26

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