/srv/irclogs.ubuntu.com/2011/07/19/#upstart.txt

praveen_pkWhen I try to start /sbin/init in a chroot of RHEL6, it complains about not being able to connect to /com/ubuntu/Upstart, Does init need d-Bus at Startup?13:36
=== serue_ is now known as hallyn
csgeekis there a user's mailing list to subscribe to?  for asking questions.. I saw a devel list.. but I presume that's for new features being added to upstart itself. 17:57
wraidenwhat is your question?17:59
csgeekwell.. I have an upstart script that starts up fine, but it fails to terminate properly 18:09
csgeekone sec.. I'll do a pastie 18:09
csgeekwraiden:   http://pastie.org/2238507  18:12
wraidenmhm18:22
wraidenthe supervision of the process works?18:23
wraidendo you terminate with "initctl stop jobname"?18:26
csgeekI used sudo stop jobname 18:26
wraidenthats a shortcut...18:27
wraidenok18:27
wraiden"initctrl status jobname" lists the right pid ?18:27
wraidenit has to be the right pid as it is the pid of the process that gets a sigterm to be stopped18:29
csgeekhmm.. the PID it captures seems off 18:31
wraidenthere is your problem18:34
wraidenyou have two exec in your main process...18:36
wraidenthe "expect fork" follows only the first18:36
wraidenyou can try "expect daemon"18:36
wraidenmhm18:40
csgeekokay.. does that the job still need to be backgrounded?  ie.  scriptname &  ?  18:40
wraideni think so18:40
wraidenthe exec stuff that i talked was rubbish...18:40
wraidenthe execs use the same process environment so there are no forks18:41
wraidentry without expect fork18:41
csgeekokay.. one sec.. rebooting to reset state  and all that (glad i'm doing this on a vm ) 18:44
csgeekokay.. seems to work now18:48
csgeekended up removing fork/daemon statements18:49
csgeekand i'm not backgrounding the job 18:49
danoljquestion regarding redis upstart script for ubuntu, more about redis than the upstart script18:55
danoljhere is the proposed upstart script http://pastebin.com/n1nHhnF618:55
danoljactually, this is an upstart question, sorry18:55
danoljthe line 'pid file $PID_FILE' 18:56
danoljas I've read in the docs indicates to upstart18:56
danoljthat it should monitor this process by the pid file, correct?18:56
wraidenwhat version of upstart?19:00
danolj0.6.5-819:00
wraidenman 5 init states "pid file" ?19:01
csgeekI'm on 11.04 natty.  so..     0.9.719:02
wraideni think this was before the supervision was changed to use signals from the kernel to the init process...19:02
wraideni use upstream 1.319:02
wraidennot on ubuntu at all *g*19:03
wraidena quick grep over souces went negative19:03
wraiden*sources19:03
wraidenthere is no pid stanza in 1.319:04
danoljok, thanks19:06
danoljso, perhaps I should simply have redis not daemonize itself so that init/upstart can retain a handle on it, sound good?19:06
csgeekokay.. I have one last question.. .. I wanted to set it up so when I call childJob, it knows that its requires parentJob, so if parentJob isn't running it'll start it then, start the childJob?  any wiki/doc page I can look at that talks about the process?  19:08
wraidendanolj: that would be the first thing to use if a service provides a "don't fork or daemonize"-option ...19:15
danoljredis provides the choice19:16
wraidenread the http://upstart.ubuntu.com/cookbook/19:16
danoljto confirm, don't daemonize redis if using init/upstart as the supervisory process19:16
danoljwraiden: okay, thanks for the pointer!19:16
danoljoh, yes, I have been reading that19:17
danoljfound section 6.8.2 regarding daemonizing, thanks19:18
wraidencsgeek: you can hook in on starting and stopping events of the child with the parent but if parent should be running without child by default but could be stopped it could be scripted in pre-start with help of initctl19:26
csgeekthanks for all the help wraiden19:28
wraidenyou're welcome...19:30
wraidena port of the rhel cluster suite init scripts is a hell of an effort...19:32

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