/srv/irclogs.ubuntu.com/2007/05/20/#upstart.txt

=== juergbi [n=juerg@80-219-19-101.dclient.hispeed.ch] has joined #upstart
=== phoenix24 [n=phoenix2@59.176.14.6] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== cortana [n=sam@62-31-146-25.cable.ubr12.azte.blueyonder.co.uk] has joined #upstart
=== Keybuk [n=scott@wing-commander.netsplit.com] has joined #upstart
Keybukrefactoring is such great fun02:06
ion_Heh02:27
AlexExtremewhy's that? :)02:28
Keybukcleaned up event.c a little bit02:37
AlexExtremecool02:37
Keybukgot rid of the evily named EventEmission structure02:37
Keybuk(that's now just Event)02:38
Keybuk(and what was Event is now EventInfo)02:38
Keybukalso added some ref-counting stuff, so we can keep Event information around after it's been handled (since it populates environment, etc.)02:38
Keybukhttp://codebrowse.launchpad.net/~keybuk/upstart/main/revision/scott%40netsplit.com-20070520120917-6yanaj1t0a1ej3zd?start_revid=scott%40netsplit.com-20070520121451-6273as3mqxmumuai#init/job.c02:42
ion_         * should be releaed and the event should be freed.02:49
ion_test_event.c02:49
Keybuk:-)03:00
Keybuknext thing to figure out is what the difference between Jobs and States means03:00
Keybuk * should they be configured in different directories?03:02
Keybuk   or should they be the same, just without processes specified03:03
Keybuk   - if different, how do we avoid name clashes?03:03
Keybuk   - if the same, how do we prevent "start STATE" from working?03:03
Keybuk     and what happens if you turn a file from a job to a state or vice-versa?03:03
AlexExtremeif it's the same, can't you prevent start STATE from working by having init work out whether it is a state, and if it is chuck back an error and bail out?03:05
AlexExtremeor is it not possible to work out?03:05
ion_Perhaps the use cases should be considered to determine that.03:07
ion_That is, what Keybuk said.03:07
Keybukwhat I want to avoid is having the entire Job structure around for a State03:21
Keybukotherwise, what's the difference?03:21
KeybukI can see two easy ways to do that03:21
Keybukone is to have a states hash, as well as a jobs hash, and have something evil in cfgfile.c that returns State instead of Job if there's no processes configured, etc.03:21
Keybukbut you'd then have to look in both hashes all the time03:22
Keybukthe other way would be to get rid of the jobs hash03:24
Keybukinstead have a "registry"03:24
Keybukthat'd probably have several levels03:24
Keybuk1) configuration directory (e.g. /etc/??, ~/.??, etc.)03:24
Keybuk2) filename03:25
Keybuk3) state or job found there03:25
Keybukand hash at (3)03:25
Keybukthat way, a file that defines both a state and a job (ie. an ordinary job) would be able to used as either a state or a job03:25
Keybukbut a file that defined just a state could only be used as a state03:25
Keybukalso that makes -HUP easy ;P03:25
Keybukand I could move all the "replacement" stuff into that03:26
Keybuk(though when do you replace a State file?)03:27
=== cortana [n=sam@62-31-146-25.cable.ubr12.azte.blueyonder.co.uk] has joined #upstart
=== phoenix24 [n=phoenix2@59.176.18.197] has joined #upstart
=== Keybuk ponders
KeybukI guess the major question is: does it make sense to let sysadmins manually start/stop a "state" ?04:30
Keybuke.g. if you've defined "user-can-login" as a state04:30
Keybuk(or writable-filesystem, filesystem-and-networking, etc.)04:31
=== phoenix24 [n=phoenix2@59.176.14.31] has joined #upstart
AlexExtremei don't think it makes sense, really. they aren't processes, so you should really be able to start/stop them. and if you have a case where a state hasn't really been reached, yet the sysadmin still starts it, it could cause some problems04:38
AlexExtremeso in the long run it'd be less problematic, IMO04:39
ion_I cant think of a state a sysadmin would need to start or stop manually. I cant think clearly with this flu in addition to my usual symptoms, though. :-)04:40
Keybukhmm04:41
Keybukso better question, should you be able to have a pre-start and/or post-stop script for a state?04:41
AlexExtremehmm04:46
AlexExtremei'm not sure...04:46
AlexExtremei can't really think of a use case for that04:46
ion_How about having a process ping a remote host every once in a while and set a network-reachable state based on the pong?04:47
AlexExtremeat the moment we can create a job without a main process, just a pre-start and post-stop. are those states or are they still jobs?04:47
Keybukexactly04:48
Keybukuse case: runlevel-2 state that sets utmp on the way in?04:49
AlexExtremehmm04:49
AlexExtremeyes04:49
Keybukuser-can-login state that removes /etc/nologin on the way in, touches it on the way out?04:49
AlexExtremeyep04:49
KeybukI can think of examples that are "nice"04:50
Keybukand can't think of any counter-reasons why it should be forbidden04:50
ion_Yeah, definitely.04:50
AlexExtremeyep04:50
Keybukwhich means that "State" would need the same internal state machine as "Job"04:54
Keybukalong with the ability to define processes, and their environment04:54
Keybukso the difference between a state and a service is purely semantic04:54
Keybukthat makes things much easier, since it answers the questions like how to decide when to replace a state definition with one from an updated config file05:06
ion_Defining states just as jobs without a main process follows the KISS principle.05:07
=== cortana [n=sam@62-31-146-25.cable.ubr12.azte.blueyonder.co.uk] has joined #upstart
Keybukyeah06:00
keiri have a possibly rude question: how long until upstart begins shrinking boot time via parallel process start, etc?06:07
AlexExtremeit already can do06:07
AlexExtremeit'll *probably* be available in ubuntu 7.1006:07
=== mbiebl [n=michael@e180068028.adsl.alicedsl.de] has joined #upstart
keiri don't mind long boots on my desktop, but they are killer on my laptop06:10
keirespecially since suspend is broken06:10
Keybukit's interesting how hating the first normally co-incides with being affected by the 2nd :p06:10
keirheh06:11
keiri dream of fresh-install XP SP2 boot times for ubuntu06:11
keirnow that os boots fast!06:11
Keybukonly the first time ...06:12
cortanabut if you add up all the times you _have_ to boot it, i wonder which one eats a larger chunk of one's life06:12
keirtrue! but i used to run it on my laptop for old games06:16
keiri only had FF and the games installed06:16
keiri always got very jealous when it would boot up in 15 seconds or so06:16
cortanait's a good thing that winodws boots in about 20-25 seconds06:17
cortanai have to reboot about 3-4 times ususally to get my keyboard to work06:17
KeybukUpstart's primary goal isn't to make boot faster06:18
keirKeybuk, i know06:18
Keybukit's too make it more reliable and robust06:18
cortanathere is a totally random 75% chance that my keyboard will _not_ work on any given boot into xp :(06:18
Keybukas well as provide more flexibility for what's actually running06:18
keirKeybuk, it'd be great if that was a side effect :)06:18
Keybukwe just happen to also think it will speed it up06:18
=== mbiebl [n=michael@e180068028.adsl.alicedsl.de] has joined #upstart
=== mbiebl [n=michael@e180068028.adsl.alicedsl.de] has joined #upstart
=== phoenix24 [n=phoenix2@59.176.14.31] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/Amaranth] has joined #upstart
=== dg [i=dgl@otherwize.co.uk] has joined #upstart
=== phlaegel [n=phlaegel@S01060016b619a773.ok.shawcable.net] has joined #upstart
=== mbiebl [n=michael@e180068028.adsl.alicedsl.de] has joined #upstart
=== phoenix24 [n=phoenix2@59.176.14.31] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/Amaranth] has joined #upstart
=== dg [i=dgl@otherwize.co.uk] has joined #upstart
=== phlaegel [n=phlaegel@S01060016b619a773.ok.shawcable.net] has joined #upstart
=== Starting logfile irclogs/upstart.log
=== ubuntulog [i=ubuntulo@ubuntu/bot/ubuntulog] has joined #upstart
=== Topic for #upstart: Upstart 0.3.8 | http://upstart.ubuntu.com/ | http://upstart.ubuntu.com/wiki/UpstartOnGentoo
=== Topic (#upstart): set by Md at Sun May 6 19:59:46 2007
=== cortana [n=sam@62-31-146-25.cable.ubr12.azte.blueyonder.co.uk] has joined #upstart
=== quitte [n=quitte@stgt-d9bebdd5.pool.mediaWays.net] has joined #upstart
quittehi. has anyone tried compiling upstart using uclibc? I get this error:child.c: In function 'nih_child_poll': child.c:141: error: 'WEXITED' undeclared (first use in this function) WNOWAIT is also undeclared11:01
=== Starting logfile irclogs/upstart.log
=== ubuntulog [i=ubuntulo@ubuntu/bot/ubuntulog] has joined #upstart
=== Topic for #upstart: Upstart 0.3.8 | http://upstart.ubuntu.com/ | http://upstart.ubuntu.com/wiki/UpstartOnGentoo
=== Topic (#upstart): set by Md at Sun May 6 19:59:46 2007
quittenow I'm getting undefined reference to `inotify_add_watch. do you happen to know what is missing in uclibc for that,too?12:10
Keybuksys/inotify.h12:12
quittehmm. that should comefrom the kernel, not uclibc?12:13
Keybukthe libc still has to define the syscall12:14
quitteah12:14
quitteit's already there. what is this nih thing?12:20
Keybukit's the standard library that upstart uses12:23
Keybuklike glib, or something12:23

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