=== 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 [02:06] refactoring is such great fun [02:27] Heh [02:28] why's that? :) [02:37] cleaned up event.c a little bit [02:37] cool [02:37] got rid of the evily named EventEmission structure [02:38] (that's now just Event) [02:38] (and what was Event is now EventInfo) [02:38] also added some ref-counting stuff, so we can keep Event information around after it's been handled (since it populates environment, etc.) [02:42] http://codebrowse.launchpad.net/~keybuk/upstart/main/revision/scott%40netsplit.com-20070520120917-6yanaj1t0a1ej3zd?start_revid=scott%40netsplit.com-20070520121451-6273as3mqxmumuai#init/job.c [02:49] * should be releaed and the event should be freed. [02:49] test_event.c [03:00] :-) [03:00] next thing to figure out is what the difference between Jobs and States means [03:02] * should they be configured in different directories? [03:03] or should they be the same, just without processes specified [03:03] - if different, how do we avoid name clashes? [03:03] - if the same, how do we prevent "start STATE" from working? [03:03] and what happens if you turn a file from a job to a state or vice-versa? [03:05] if 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] or is it not possible to work out? [03:07] Perhaps the use cases should be considered to determine that. [03:07] That is, what Keybuk said. [03:21] what I want to avoid is having the entire Job structure around for a State [03:21] otherwise, what's the difference? [03:21] I can see two easy ways to do that [03:21] one 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:22] but you'd then have to look in both hashes all the time [03:24] the other way would be to get rid of the jobs hash [03:24] instead have a "registry" [03:24] that'd probably have several levels [03:24] 1) configuration directory (e.g. /etc/??, ~/.??, etc.) [03:25] 2) filename [03:25] 3) state or job found there [03:25] and hash at (3) [03:25] that 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 job [03:25] but a file that defined just a state could only be used as a state [03:25] also that makes -HUP easy ;P [03:26] and I could move all the "replacement" stuff into that [03:27] (though when do you replace a State file?) === 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 [04:30] I guess the major question is: does it make sense to let sysadmins manually start/stop a "state" ? [04:30] e.g. if you've defined "user-can-login" as a state [04:31] (or writable-filesystem, filesystem-and-networking, etc.) === phoenix24 [n=phoenix2@59.176.14.31] has joined #upstart [04:38] i 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 problems [04:39] so in the long run it'd be less problematic, IMO [04:40] 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:41] hmm [04:41] so better question, should you be able to have a pre-start and/or post-stop script for a state? [04:46] hmm [04:46] i'm not sure... [04:46] i can't really think of a use case for that [04:47] 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] at 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:48] exactly [04:49] use case: runlevel-2 state that sets utmp on the way in? [04:49] hmm [04:49] yes [04:49] user-can-login state that removes /etc/nologin on the way in, touches it on the way out? [04:49] yep [04:50] I can think of examples that are "nice" [04:50] and can't think of any counter-reasons why it should be forbidden [04:50] Yeah, definitely. [04:50] yep [04:54] which means that "State" would need the same internal state machine as "Job" [04:54] along with the ability to define processes, and their environment [04:54] so the difference between a state and a service is purely semantic [05:06] that 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 file [05:07] Defining states just as jobs without a main process follows the KISS principle. === cortana [n=sam@62-31-146-25.cable.ubr12.azte.blueyonder.co.uk] has joined #upstart [06:00] yeah [06:07] i have a possibly rude question: how long until upstart begins shrinking boot time via parallel process start, etc? [06:07] it already can do [06:07] it'll *probably* be available in ubuntu 7.10 === mbiebl [n=michael@e180068028.adsl.alicedsl.de] has joined #upstart [06:10] i don't mind long boots on my desktop, but they are killer on my laptop [06:10] especially since suspend is broken [06:10] it's interesting how hating the first normally co-incides with being affected by the 2nd :p [06:11] heh [06:11] i dream of fresh-install XP SP2 boot times for ubuntu [06:11] now that os boots fast! [06:12] only the first time ... [06:12] but if you add up all the times you _have_ to boot it, i wonder which one eats a larger chunk of one's life [06:16] true! but i used to run it on my laptop for old games [06:16] i only had FF and the games installed [06:16] i always got very jealous when it would boot up in 15 seconds or so [06:17] it's a good thing that winodws boots in about 20-25 seconds [06:17] i have to reboot about 3-4 times ususally to get my keyboard to work [06:18] Upstart's primary goal isn't to make boot faster [06:18] Keybuk, i know [06:18] it's too make it more reliable and robust [06:18] there is a totally random 75% chance that my keyboard will _not_ work on any given boot into xp :( [06:18] as well as provide more flexibility for what's actually running [06:18] Keybuk, it'd be great if that was a side effect :) [06:18] we just happen to also think it will speed it up === 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 [11:01] hi. 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 undeclared === 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 [12:10] now I'm getting undefined reference to `inotify_add_watch. do you happen to know what is missing in uclibc for that,too? [12:12] sys/inotify.h [12:13] hmm. that should comefrom the kernel, not uclibc? [12:14] the libc still has to define the syscall [12:14] ah [12:20] it's already there. what is this nih thing? [12:23] it's the standard library that upstart uses [12:23] like glib, or something