[12:42] <_ion> Hm, Keybuk hasn't been here for three days. === j_ack [n=rudi@p508DB835.dip0.t-ipconnect.de] has joined #upstart === osx5 [n=danielka@c-24-3-201-47.hsd1.mn.comcast.net] has joined #upstart [02:16] hello [02:18] anyone from freenode staff here? [02:18] Md? [02:19] k === osx5 [n=danielka@c-24-3-201-47.hsd1.mn.comcast.net] has joined #upstart [02:26] Md must be afk [02:27] <_ion> How may we help you with upstart? [02:27] I want a hostname cloak [02:27] but thanks [02:28] is upstart better/ [02:28] ? [02:28] <_ion> Well, yes. :-) [02:29] what makes it better? [02:29] I use darwin on mac osx [02:32] <_ion> See the "How does it differ from launchd?" heading at http://www.netsplit.com/blog/articles/2006/08/26/upstart-in-universe [02:32] <_ion> (Seems like the page's markup is broken) [02:32] k [02:32] I'm new to unix [02:32] and linux === AStorm [n=astralst@host-81-190-179-124.gorzow.mm.pl] has joined #upstart === AStorm [n=astralst@host-81-190-179-124.gorzow.mm.pl] has joined #upstart === osx5 [n=danielka@c-24-3-201-47.hsd1.pa.comcast.net] has joined #upstart === space-m0nkey_ [n=chatzill@client-82-3-73-143.manc.adsl.virgin.net] has joined #upstart === space-m0nkey_ is now known as space-m0nkey [03:08] will MD ever return? [03:09] <_ion> Let me check his wereabouts from my surveillance equipment... [03:09] lol === osx5 [n=danielka@c-24-3-201-47.hsd1.pa.comcast.net] has left #upstart [] === osx5 [n=danielka@c-24-3-201-47.hsd1.pa.comcast.net] has joined #upstart [03:11] oh he left [03:11] wonderful [03:11] lol === Amaranth [n=travis@ubuntu/member/Amaranth] has joined #upstart === Amaranth [n=travis@ubuntu/member/Amaranth] has joined #upstart === AStorm [n=astralst@host-81-190-179-124.gorzow.mm.pl] has joined #upstart === wasabi [n=jhaltom@ubuntu/member/wasabi] has joined #upstart === wasabi__ [n=wasabi@cpe-76-184-96-5.tx.res.rr.com] has joined #upstart === AlexExtreme [n=AlexExtr@frugalware/developer/AlexExtreme] has joined #upstart === Md_ [i=md@freenode/staff/md] has joined #upstart === Keybuk [n=scott@quest.netsplit.com] has joined #upstart === Md_ is now known as Md [10:35] <_ion> Welcome back, Keybuk :-) [10:36] heyhey [10:36] "welcome back" ? :P [10:36] did I go somewhere? [10:37] <_ion> For almost 3 days you did. ;-) [10:38] we call that a "weekend" :p [10:38] <_ion> Hehe [11:05] "until" is causing me issues [11:07] <_ion> Why is that? [11:07] well, how it should behave [11:07] simplest example: [11:07] foo until bar [11:07] I think it's pretty obvious that the job is running when foo happens, and stops running when bar happens [11:08] however ... if foo happens again after bar has happened, should the job be started again or not? [11:08] <_ion> I do think it should. [11:09] I agree, simply on the basis that upstart shouldn't consider anything to be permanent [11:09] e.g. in an upstart system, you should be able to kill all processes, then issue the "startup" event again as a kind of soft reboot [11:10] <_ion> Also, '(foo and baz) until bar': IMHO after bar, *both* foo and baz should happen again. [11:10] hang on, getting to that ;p [11:10] so, with the above example, we can implement until simply [11:11] it's just a tree node that is TRUE when the left becomes TRUE, and FALSE when the right becomes TRUE [11:11] no further handling is needed [11:11] so right, more complex example as you said [11:11] (foo or bar) until baz [11:11] I think that's pretty obvious; either foo or bar must happen for it to be started, baz stops it, and either foo or baz can start it again [11:12] <_ion> Yeah, with the 'and' case the implementation definitely becomes more complex. [11:13] right [11:13] foo until (bar or baz) [11:13] that's still simple [11:13] and makes it more complex [11:13] (foo and bar) until baz [11:13] now, I think this should behave thus: [11:13] foo and bar need to happen in any order for the job to be started [11:13] baz happening stops it [11:14] after which, both foo and bar need to happen again [11:14] (rather than just one or the other happening) [11:14] <_ion> Indeed. [11:15] so that makes the implementation a little more complex [11:16] when the right hand side is set to TRUE, the until node becomes FALSE *and* sets the left hand tree to FALSE [11:17] (ie. all nodes in the left hand tree) [11:18] does that sound sane? [11:22] <_ion> Is '(foo until bar) until baz' supported? (I can't think of any use cases for it wouldn't it be exactly equivalent to 'foo until baz'?) [11:22] we'll get to that in a bit, thinking this one step at a time [11:22] foo until (bar and baz) [11:23] that's somewhat interesting [11:23] foo starts it, but bar and baz both need to happen to stop it [11:23] once stopped, only foo needs to happen to start it again; but both bar and baz need to happen again to stop it [11:23] so that implies that when the left hand side is set to TRUE, the until node becomes TRUE *and* sets all nodes on the right hand side to FALSE [11:25] <_ion> Yes, it seems to me that nodes should be able to recursively set children to FALSE. [11:25] right [11:25] so (foo until bar) until baz [11:26] until [11:26] until baz [11:26] foo bar [11:26] foo has to happen for the tree to be TRUE [11:26] if either bar or baz happens, the tree becomes FALSE [11:27] <_ion> Ah, right. [11:27] in either case, only foo needs to happen again for it to become TRUE again [11:27] so it's exactly equivalent to foo until (bar or baz) [11:29] <_ion> So when baz happens, the topmost 'until' asks the child 'until' to set itself as FALSE, which doesn't need to do anything else than ask all its children to set themselves FALSE. [11:30] tight [11:30] right [11:30] <_ion> (Thinking like OOP and recursive programming, of course the actual implementation doesn't need to be either object-oriented or recursive.) [11:32] *nods* [11:32] I actually have a non-recursive tree iterator in libnih [11:32] but anyway [11:32] right [11:32] so until is quite simple provided that all operators and operands are simple [11:33] <_ion> Yeah, i remember skimming through that change. [11:33] lets introduce a less simple operator/operand [11:33] with JOB [11:33] how do we define that? [11:33] either its TRUE when the job's goal is START and FALSE when the job's goal is STOP [11:33] OR [11:33] its TRUE when the job's state is RUNNING and FALSE otherwise [11:33] OR [11:34] its FALSE when the job's state is WAITING and TRUE otherwise [11:34] [11:34] <_ion> :-) [11:34] <_ion> Its use cases should probably be listed to find the answer. [11:34] the problem is it was defined over hot thai food [11:34] while we were crying and sweating [11:35] <_ion> Hehe [11:35] and before we came up with the idea that "starting" and "stopping" should be blocking events [11:35] <_ion> So, *are* there use cases for it that can't be done with the already existing things? [11:35] well... [11:35] obviously you can use until and the job events [11:36] starting JOB until stopped JOB [11:36] started JOB until stopping JOB [11:36] with the advantage that those retain the blocking behaviour [11:36] the actual use case for "with" was that you could place complex stanzas in a file that could be shared [11:37] and then just say "do whatever that one says" [11:38] it also happens to provide a "running with another job without blocking it" kind of syntax [11:43] <_ion> What are the use cases for that? I.e. what are the jobs that should run 'with' another job without blocking it? [11:44] dunno [11:44] the main use case seems to be putting syntax in another file [11:47] <_ion> For example, if there's a dummy job 'networking' with nothing but 'on' stanzas, i think it is good for a job using 'started networking until stopping networking' to block whatever 'networking' blocks. [11:47] a reasonable point [11:58] ok, so let's skip with for now [11:58] and think ahead to temporary events [11:58] "every hour" for example [11:58] every hour and network-up until network-down [11:58] pretty obvious; the "every hour" event triggers once an hour [11:58] and and combines that with the until, so it only gets used if the network is up [11:58] ... [11:59] every hour until some-event [11:59] that one is a bastard :p [11:59] <_ion> Hmm... :-) [12:00] I think some of the problem is the words we're using [12:00] <_ion> I can't think of anything else than starting it at every hour and stopping it when some-event happens. [12:01] <_ion> Sorry, i mean: [12:01] if "foo until bar and frodo until bilbo" was actually "between foo and bar while between frodo and bilbo", it makes more sense [12:01] so it'd be obvious that "between every hour and some-event" behaves as you describe (which is how it would behave) [12:01] <_ion> Start it at 00:00. Nothing changes until 03:12, when some-event happens. Start it at 04:00, until some-event happens again [12:01] right [12:02] English and Logic don't collide adequately [12:02] <_ion> Heh [12:03] (the fact that in English, "foo until bar and frodo until bilbo" describes a period where either of the two is active (where logically it's when both are active) [12:03] and "foo until bar or frodo until bilbo" describes a period where only one of the two is active (when logically it's when either are active)) [12:06] <_ion> Would substituting 'or', 'and', 'until' with |, &, -> respectively be too ugly? [12:07] <_ion> The Finnish keymap also has :-) [12:08] <_ion> Although i don't use it for anything else than writing Finnish specifically, it sucks for general use. :-) [12:10] I don't think the punctuation changes anything, as you'd still read it in English [12:11] http://upstart.ubuntu.com/wiki/ComplexEventConfig [12:11] ^ so that's a reworked draft [12:11] <_ion> True. === reppel [n=reppel@213-140-11-128.fastres.net] has joined #upstart [02:30] <_ion> Looks nice. === space-m0nkey [n=chatzill@client-82-3-73-143.manc.adsl.virgin.net] has joined #upstart === cortana [n=sam@62-31-146-25.cable.ubr12.azte.blueyonder.co.uk] has joined #upstart === j_ack [n=rudi@p508D9227.dip0.t-ipconnect.de] has joined #upstart === AStorm [n=astralst@chello084010114027.chello.pl] has joined #upstart [06:51] <_ion> keybuk: Have you had time to hack more on replacement-initscripts yet? [06:52] not yet [06:52] well [06:52] have been thinking and experimenting deeply with mounting filesystems [06:52] my original plan had been an instance job fired up each time a drive was mounted [06:52] <_ion> That's actually what i wanted to ask about... [06:52] and the job was just to mount that path [06:52] and have a similar one for unmounting [06:53] but that doesn't work in the face of needing to mount /usr/local after /usr [06:53] <_ion> Exactly. Have you got a solution yet? === j_ack [n=rudi@p508D9227.dip0.t-ipconnect.de] has joined #upstart === juergbi [n=juerg@80-219-17-102.dclient.hispeed.ch] has joined #upstart [06:59] <_ion> An idea, probably filled with race conditions :-) : a file on RAM disk that contains the list of filesystems ready to be mounted. The 'fsck' job could contain 'echo "$DEVICE" | locked-write --append /ramdiskpath/mount; /sbin/initctl emit filesystem-checked -eDEVICE' and the 'mount' job would start on filesystem-checked and contain 'locked-read /ramdiskpath/mount | while read device ... ... for device in $ok_to_mount; do [mount them] ' [07:00] <_ion> Feel free to punch holes in it. :-) [07:02] <_ion> whatever starts on block-device-removed would have to remove the devices from the list while locking it. [07:03] <_ion> That's what the mount job should do on successful mount, too. [07:09] Keybuk, what about using dependencies to do this? :> [07:10] Just add parametrised dependencies (e.g. use of $VALUE in deps) [07:30] I'm vaguely leaning towards just having a "mount -a" job and make sure that fails if at least one filesystem could not be mounted [07:32] <_ion> How about ones being fsck'd? [07:33] aye, tricky [07:34] Keybuk: check what suse does, I know that for a long time they have been running fsck/mount on demand triggered by uevents [07:40] Md: good point [07:43] if all else fails, sleep for a while in a loop if the mount point does not exist [07:45] <_ion> mountd? :-) [07:46] HAL! [07:46] sometimes I wish I worked for Apple [07:47] then I'd know everything was on the one filesystem [07:47] :p [07:47] <_ion> Heh [07:49] SUBSYSTEM=="block", ACTION=="add", KERNEL=="sd*[0-9] |hd*[0-9] ", RUN+="mount.sh" [07:49] <_ion> mount.sh does the fscking, too? [07:49] yup [07:50] (not that I had a handy vmware instance of opensuse around or anything ...) [07:50] <_ion> And what does it do when there's /usr/local waiting for /usr? [07:50] it just runs mount -a after each fsck [07:52] <_ion> I take it udev has a command queue, multiple mount.shs are never started simultaneously? [07:53] no, they are [07:53] <_ion> Does mount.sh contain locking then? [07:53] <_ion> I probably should just grab the script from somewhere myself. :-) === jonib1 [n=jonas@ua-83-227-144-18.cust.bredbandsbolaget.se] has joined #upstart === thotz [n=thomas@d86-33-125-87.cust.tele2.at] has joined #upstart === thotz [n=thomas@d86-33-125-87.cust.tele2.at] has left #upstart [] === space-m0nkey [n=chatzill@client-82-3-73-143.manc.adsl.virgin.net] has joined #upstart === phsdv [n=paul@dyn-83-152-232-59.ppp.tiscali.fr] has joined #upstart === Md [i=md@freenode/staff/md] has joined #upstart [09:14] _ion: it calls mount -a $DEVNAME [09:14] which is interesting [09:14] it doesn't seem to account for mountpoint not existing at all === AStorm [n=astralst@chello084010114027.chello.pl] has joined #upstart === mbiebl [n=michael@e180076146.adsl.alicedsl.de] has joined #upstart === pkt [n=pantelis@athedsl-131388.otenet.gr] has joined #upstart === j_ack [n=rudi@p508DA63E.dip0.t-ipconnect.de] has joined #upstart