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

=== int0x0c [n=ben@161.253.14.157] has joined #upstart
=== chowmeined [n=will_@76.28.132.206] has joined #upstart
=== GodEater_ [n=bryan@rockbox/staff/GodEater] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== int0x0c [n=ben@161.253.13.153] has joined #upstart
=== Keybuk [n=scott@wing-commander.netsplit.com] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/Amaranth] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== dspstv [n=aeroflot@AMarseille-252-1-184-27.w86-219.abo.wanadoo.fr] has joined #upstart
dspstvhi all02:42
dspstvim on this machine that has ubuntu02:42
dspstvso no inittab is present02:43
dspstvand i just need to add one line to put a program to respawn if it crahses02:43
dspstvi've read and google has mislead me since yesterday02:43
dspstvnow, someone from the ubuntu channel told me to ask in here02:43
=== juergbi [n=juerg@80-219-21-79.dclient.hispeed.ch] has joined #upstart
dspstvin inittab it will be just adding one line...02:44
dspstvim lost02:44
Keybukinittab isn't used in Ubuntu02:48
Keybukwhat would you like to do?02:48
dspstvKeybuk, yes that i figured02:52
dspstvi just need to add a line02:53
dspstvfor a program02:53
dspstvi need to keep alive02:53
dspstvso, respawn was my friend02:53
Keybukwhat line would you have added?02:54
dspstvlet me see..03:01
dspstvi have to copy any and just change the service for the program i want03:01
dspstvneed to just know where one does that in upstart03:06
dspstvplease03:06
dspstvi have a software for music called pd03:06
dspstvi need to treat it as a deamon03:06
dspstvi have done that in other distros03:06
Keybukyou're not helping yourself here03:06
dspstvsure03:06
dspstvi can agree03:06
dspstvim not a pro on this03:07
Keybukif you give me the details you enter into inittab, I can tell you what you need to do for upstart03:07
dspstvok03:07
Keybuke.g. what command is it that you need to run, etc.?03:07
Keybukdoes that command go into the background when you run it?03:07
dspstvthis is what i had used03:24
dspstvnull:12345:respawn:/bin/pd -nogui -verbose -nomidi03:24
dspstvnull:12345:respawn:/bin/pd03:24
Keybukok03:25
Keybukso in Upstart parlance, you'd need a file in /etc/event.d containing03:25
Keybukrespawn03:25
Keybukexec /bin/pd -nogui -verbose -nomidi03:25
Keybuk-- 03:26
Keybukthat requires manual starting, see the tty1 file for how to make it start and stop in certain runlevels03:26
dspstvKeybuk, the name of that file requieres a special naming structure?03:29
dspstvKeybuk, tx!03:29
Keybukdspstv: no, name can be whatever you like03:29
dspstvman tx again03:36
dspstvi take note now03:36
=== kdag [n=aeroflot@AMarseille-252-1-67-29.w86-194.abo.wanadoo.fr] has joined #upstart
=== kdag [n=aeroflot@AMarseille-252-1-67-29.w86-194.abo.wanadoo.fr] has left #upstart ["out]
=== mbiebl [n=michael@p5B13374E.dip0.t-ipconnect.de] has joined #upstart
=== mbiebl_ [n=michael@p5B13374E.dip0.t-ipconnect.de] has joined #upstart
=== j_ [n=j@fe2adsl-2.wyplay.net] has joined #upstart
j_hi06:15
Jc2khi06:16
=== Keybuk [n=scott@wing-commander.netsplit.com] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/Amaranth] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== mbiebl [n=michael@85.180.68.116] has joined #upstart
=== j_ [n=j@88-139-64-51.adslgp.cegetel.net] has joined #upstart
j_hi09:45
Jc2khi09:45
j_I'm looking for an upstart maintainer09:45
Jc2kif you ask a q and idle someone will get back to u09:46
j_I'd like to known when it's schedule to add the "and" condition in upstart09:47
Keybukj_: it's already added on bzr trunk, but has interestingly unexpected issue10:23
j_could you be more specific?10:26
Keybukwell, take a simple example10:27
Keybukstart on foo and bar10:27
Keybukstop on frodo or bilbo10:27
Keybuk-- 10:27
Keybukfoo happens, job remains stopped10:27
Keybukbar happens, job starts10:27
Keybukfrodo happens, job sttops10:27
Keybuk--10:27
Keybuknow, do foo *and* bar both need to happen again?10:27
Keybukor is it enough that either happens?10:27
=== ..[topic/#upstart:Keybuk] : Upstart 0.3.8 | http://upstart.ubuntu.com/ | http://people.ubuntu.com/~fabbione/irclogs/ | https://lists.ubuntu.com/archives/upstart-devel/2007-October/000468.html
Jc2kKeybuk: eh, in my scheduler i was lucky in that i could say *both* always needed to happen again :D10:36
Jc2kre the two seperate upstart services idea, i think you would have a chance at doing it by exposing an interface from the manager back the job handler (pid 1)10:37
j_I think that it will stop10:37
Jc2kbut it would get messy10:37
Keybukj_: remain stopped?10:37
Keybukso if frodo or bilbo happen, the job needs both foo and bar to happen again?10:38
j_no10:38
Keybukno?  what happens once a job stops then?10:38
Keybukwhich events can restart it?10:38
j_not necessarlely10:38
j_you may need to a once condition10:39
j_like that10:40
Keybuk?10:40
j_start_once on  foo and bar 10:40
Keybuk?10:40
j_stop on  frodo or bilbo10:40
j_respan on  foo or bar10:41
Keybukthat makes it insanely complicated ;)10:41
j_You're right10:41
Keybuksince then upstart would need to track whether a job has been run once or not :)10:41
j_I think that the problem is to known what do to respam it10:42
Keybukin practice I think that consistency is better than flexibility10:43
Keybuksince it's easier to document consistent behaviour10:43
Keybukand consistent behaviour has emergent properties10:43
Keybukthe problem I hit was I implemented it to both events had to happen again10:43
Keybukonce a job was in stop/waiting, it "forgot" what had started it10:43
Keybukthe problem was that this worked fine10:43
Keybukexcept when the events happened while the job was still stopping10:43
Keybukin which case either one would start it again10:44
Keybukso you ended up with a curious situation where the behaviour depended on how quick you were10:44
Keybukthe worst kind of race condition10:44
Keybukso I realised that the event expression has to be evaluated10:44
Keybukbut then instantly forgotten the moment it's true10:44
Keybukinstead somehow transferring the result of that into the job10:44
Keybuknot as easy as it appeared10:44
j_could it be possible to add a "schedule work" and a lock of the events when you have a stop event10:46
Keybukj_: sorry, I don't follow10:47
j_that will fix the problem, when you have a stop , if a new event arrive it will be handle after the stop not a the same time10:48
Jc2kahh10:49
Jc2ka queue10:49
j_yes10:49
Jc2kj_: is that what you meant?10:49
Jc2kahh10:49
Jc2ktoo slow10:49
Jc2k:P10:49
j_just when you have a stop condition and only for its events10:50
j_it will append not every time10:50
Keybukor make the expression indempotent10:56
Keybukso once evaluation has finished, it can safely be evaluated again immediately10:56
j_what did you if a stop takes 1 minutes11:04
j_?11:05
Keybukit'd be restarted at the end of it11:07
Keybuksince the goal would be start, so on leaving the post-stop state, it'd move back to pre-start11:07
j_so you have a queue11:08
Keybukno11:08
j_how did you do?11:09
Keybukas I said, making the event expression indempotent11:09
Keybukonce evaluated to true, the result is copied into the job11:10
Keybukand then the expression is cleared11:10
Keybukleaving it to be evaluated again immediately11:10
Keybuk( bah, lifeless isn't online ...11:13
Keybuk  I can't troll him with BZR IS GIVING ME A SUB-OPTIMAL EXPERIENCE11:13
Keybuk  "git would handle my use case much better"11:13
Keybuk  etc. :p )11:13
Jc2ktroll me if you like, im the anti-git troll on ddl after all :)11:15
Keybukunfortunately I don't like git either11:16
KeybukI rather like bzr11:16
Keybukexcept when it behaves like a moronic child, like it's doing right now11:16
Keybuk*all* I want to do is cherry-pick commits11:17
Keybukapparently this is hard11:17
Jc2k:D11:17
=== Jc2k suddenly remembers your pro-bzr blog post :)
KeybukHoly Crap11:21
Keybuk0.3.8 was released exactly 7 months ago11:21
j_And when will arrive the new release?11:22
Keybukwhich new release? :)11:23
ion_Upstart XP11:24
AlexExtremeHuh? XP? Don't you mean Vista? ;)11:24
Keybukwasn't Vista the name of an Amiga program to render landscapes?11:24
j_0.3.9 or 0.4.011:25
Keybukthere won't be an 0.4.011:27
Keybuknext planned major is 0.511:27
Keybuksee topic :)11:27
j_I'm currently read the webpage11:28
Keybukhttps://lists.ubuntu.com/archives/upstart-devel/2007-October/000468.html11:28
j_yes11:30
ion_Hm. I remember the program, but i dont remember its name.11:31
ion_It was a really cool piece of software. :-)11:32
ion_(Assuming were thinking of the same Amiga program that generates landscapes.)11:32
KeybukWikipedia says it was Vista11:32
Keybukand then later, VistaPro11:32
ion_Anyone watch Heroes? http://heh.fi/heroes/ </spam>11:34
Keybukion_: am about half way through it11:35
Jc2kim in search of s211:35
ion_Have you read the comics? The episodes often assume youve read the corresponding ones as well.11:35
ion_(And thus the page, to easily know which ones to read between which episodes.)11:36
Keybukion_: I didn't even know there were comics11:37
=== Jc2k too
ion_Some times the comics enlighten the history of existing characters; some times they even originally introduce characters used in the following episodes.11:39
Keybukj_: https://launchpad.net/upstart/0.3/0.3.911:46
=== ..[topic/#upstart:Keybuk] : Upstart 0.3.9 | http://upstart.ubuntu.com/ | http://people.ubuntu.com/~fabbione/irclogs/ | https://lists.ubuntu.com/archives/upstart-devel/2007-October/000468.html
j_Keybuk: thanks11:51

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