/srv/irclogs.ubuntu.com/2007/06/11/#upstart.txt

=== wasabi_ [n=wasabi@cpe-76-184-122-13.tx.res.rr.com] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/Amaranth] has joined #upstart
=== wasabi_ [n=wasabi@cpe-76-184-122-13.tx.res.rr.com] has joined #upstart
=== asmlinkage [n=toby@c-69-142-94-59.hsd1.pa.comcast.net] has joined #upstart
asmlinkagedo the "start on" and "stop on" commands work in upstart 0.2.7-7 (Edgy's default version)05:42
asmlinkageI've written one main script that works fine, but a second script that uses start on and stop on to be started and stopped after the main script but upstart never starts or stops it when I start/stop the main daemon05:42
=== Md [i=md@freenode/staff/md] has joined #upstart
=== Keybuk [n=scott@quest.netsplit.com] has joined #upstart
=== sadleder [n=sadleder@p50810FCD.dip0.t-ipconnect.de] has joined #upstart
=== sadleder [n=sadleder@p50810FCD.dip0.t-ipconnect.de] has left #upstart []
=== juergbi [n=juerg@80-219-16-162.dclient.hispeed.ch] has joined #upstart
=== sadleder [n=sadleder@p50810FCD.dip0.t-ipconnect.de] has joined #upstart
=== sadleder [n=sadleder@p50810FCD.dip0.t-ipconnect.de] has left #upstart []
=== tale [n=tale@207.235.54.1] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
AlexExtremehmm, I saw some commits that looked like the new config code should work now. am I right?05:04
=== phoenix24 [i=mbiodxp@rl259.1blu.de] has joined #upstart
Keybukyup05:05
Keybukyou should be able to write a parse_profile.c in the manner of parse_job.c05:06
Keybukand add bits to the enums/switches in conf.h/conf.c05:06
AlexExtremehmm05:07
AlexExtremei tested it when I saw those commits this morning and it didn't work, some assert failed messages that were going past so fast that I couldn't read them05:07
AlexExtremea clean checkout from main, that is05:08
Keybukwhich revno?05:08
AlexExtreme72005:10
Keybukhmm05:11
Keybuk"make check" failed?05:11
=== AlexExtreme runs it
AlexExtremehmm05:13
AlexExtremeworks fine05:13
AlexExtremelet me try again05:13
Keybukcould be insufficient testing ;)05:15
AlexExtremeyikes, i cd'd up one dir too far before doing rm -rf upstart ><05:15
AlexExtremeoh well05:15
Keybukoh yeah05:17
Keybukit does kinda break, doesn't it05:17
AlexExtremeyep ;)05:17
=== JK455 [n=laugeai@fe2adsl-2.wyplay.net] has joined #upstart
JK455hi05:17
JK455i have a dumb newbie question about upstart 05:18
Keybukhi05:18
Keybuksure05:18
JK455thx 05:18
JK455how do i use it for an ordered shutdown 05:18
Keybukso an ordered shutdown is an interesting thing05:19
Keybukin fact, shutdown in general is interesting05:19
Keybukat the minimum, you're going to have an emitted event that indicates you want to shutdown05:19
Keybukthe compat/sysv uses "runlevel 0" and "runlevel 6" for this05:19
Keybukyou might use those, or call it "shutdown"05:19
JK455ok, 05:19
Keybukyou'd then have some jobs that have "start on shutdown"05:19
JK455can it be dbus event ?05:19
Keybukdbus => not right now, a dbus proxy is planned05:20
Keybuk(but not yet implemented)05:20
=== phoenix24 [i=qcuotw@rl259.1blu.de] has joined #upstart
Keybukone of the shutdown jobs can order a sequence of other jobs05:20
Keybuke.g. you might just have a shutdown job that does the sequence05:20
JK455am not sure to understand :05:21
JK455you mean, having an event on all setted process for shutdown05:21
Keybukno, just an emitted event05:22
KeybukI'm not sure what you mean by setted process ?05:22
JK455for exemple, in my script i put that it have to stop on that event05:22
Keybukright05:23
JK455like : stop on "shutd_event"05:23
JK455ok05:23
Keybukyeah, that can stop running services05:24
=== AlexExtreme has a "shutdown" job that starts on the runlevel 0 or runlevel 6 event, and then all the other jobs that i want to stop on shutdown have "stop on starting shutdown"
JK455and i will respect all previously marked dependencies ?05:24
KeybukAlexExtreme: that's actually an extremely good way to do it05:24
Keybuksince the shutdown script won't actually run until the jobs have stopped05:24
JK455i think not, right ?05:24
KeybukJK455: upstart has no concept of dependencies05:24
AlexExtremeyeah, since the actual shutdown job's script will block until the jobs are stopped05:24
KeybukAlexExtreme: *ahem* http://codebrowse.launchpad.net/~keybuk/upstart/main/revision/scott%40netsplit.com-20070611152233-klj9h8f5icjhjurh?start_revid=scott%40netsplit.com-20070611152233-klj9h8f5icjhjurh05:25
AlexExtremehmm, is there an echo here? :p05:25
JK455ok, i have to wrote all events for repect of my own dependencies05:25
AlexExtremeah, cool. that fixes it?05:25
KeybukAlexExtreme: yeah, stupid mistake05:25
AlexExtremek, i'll try it05:25
JK455and i were to wrote the piece of code that receives dbus message and use them as event, were would i had to start ?05:27
JK455"if i were"05:27
KeybukJK455: how do you mean?05:27
JK455i would like to receive events by sending dbus messages to upstart05:27
JK455if i want to do that, do you have any tips for me ?05:28
JK455well, in fact, maybe i dont need that05:30
=== phoenix24 [i=ikboo@rl259.1blu.de] has joined #upstart
AlexExtremebrb, testing that fix05:39
KeybukJK455: you'd need something linked with libdbus to receive the messages/events05:40
Keybukand linked to libupstart to pass them on to upstart05:40
Keybuk(you can do the reverse too, the same way)05:40
Keybuklibupstart is in the upstart source code in the upstart directory05:40
JK455ok05:40
Keybukutil/initctl,c links to it to do everything05:40
Keybukfundamentally, you'd match certain dbus messages and use UPSTART_EVENT_EMIT to send them on to upstart05:41
Keybukand listen for UPSTART_EVENT messages from upstart, and send them across dbus05:41
JK455ok, great05:41
JK455maybe i will wrote it i we decide using it05:42
JK455thanks a lot for this informations05:42
AlexExtremeKeybuk: works fine now05:43
AlexExtreme(mental note: it helps to bzr pull *before* trying)05:43
Keybukheh05:49
=== phoenix24 [i=dqvvqip@rl259.1blu.de] has joined #upstart
=== mbiebl [n=michael@e180068066.adsl.alicedsl.de] has joined #upstart
=== Dalios`` [n=hmmm@216.40.38.230] has joined #upstart
Keybukwoo07:40
KeybukKeybuk 1 - Config code 007:40
ion_\/07:40
KeybukI now just have to write the tests for init.conf07:42
AlexExtremeso init.conf is now possible to implement?07:56
AlexExtremeuhh07:56
AlexExtremeso it's now possible to have an init.conf, is what i meant07:56
=== Md [i=md@freenode/staff/md] has joined #upstart
KeybukAlexExtreme: in theory, yup09:04
AlexExtremenice09:05
AlexExtremehmm09:12
AlexExtremesome debian guy has sent something to upstart-devel about this meta initscript stuff09:12
=== phoenix24 [i=tlyvk@rl259.1blu.de] has joined #upstart
=== phoenix24 [i=pyh@rl259.1blu.de] has joined #upstart
=== mbiebl [n=michael@e180068066.adsl.alicedsl.de] has joined #upstart
=== phoenix24 [i=dgincl@rl259.1blu.de] has joined #upstart
=== phoenix24 [i=ksju@rl259.1blu.de] has joined #upstart
KeybukAlexExtreme: yeah was just talking to him on #debian-devel11:39
Keybukwell11:39
Keybukubuntu-devel11:39
Keybukand not just11:39
Keybukbefore doctor who, the f word, etc.11:39
KeybukAlexExtreme: so the plan there is to have11:41
Keybuk/etc/init/init.conf (optional configuration file, overrides:11:41
Keybuk/etc/init/conf.d (directory of configuration files, overrides:11:42
Keybuk/etc/init/jobs.d (directory of job definitions)11:42
Keybukconfig files can define jobs11:42
Keybuke.g.11:42
Keybuk/etc/init/conf.d/some-random-conf could contain11:42
Keybuk  job foo11:42
Keybuk    exec /sbin/daemon -d11:42
Keybuk    respawn11:42
Keybuk  end job11:42
Keybukwhich is equivalent (but higher priority than) the same text in /etc/init/jobs.d/foo11:42
Keybukconf.d becomes useful when we can define profiles, states, etc.11:43
Keybukin general, I expect distros to not use init.conf at all (useful for single-parse embedded systems)11:44
Keybukto use conf.d rarely for complicated inter-twining defaults, and setting other configuration things that we define11:44
Keybukand largely use jobs.d11:44
Keybuk(conf.d may make some more sense than states.d though, since you could just have an /etc/init/conf.d/udev that defined states for add->remove of all devices udev emits events for)11:50

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