[12:34] <_ion> keybuk: In http://upstart.ubuntu.com/wiki/ComplexEventConfig, it is said that and/or has higher precedence than until. Wouldn't that mean that 'from foo until frodo or from bar until bilbo' is equal to 'from foo until (frodo or (from bar until bilbo))'? [12:34] _ion: I dunno, I'm a bit fuzzy about how that works :p [12:34] I wrote what seemed to be right, but I think it's wrong [12:35] that spec's still in drafting until I'm sure [12:37] when it comes to precedence, I just remember that "division and multiplication beat subtraction and addition, for everything else, use parens" [12:39] <_ion> I started writing a parser based on the draft using racc (a yacc-ish parser generator for ruby) and i noticed '(from foo until (frodo or (from bar until bilbo)))' in debug output, that's why i asked. :-) Of course i realize it's still a preliminary document. [12:40] <_ion> Btw, have you considered using bison for parsing the config files? It would make defining and modifying the grammar quite easy, especially with the more complex rules. [12:41] <_ion> (Hmm, have i already asked this before?) [12:42] I originally used bison/yacc [12:42] and the code it generated was huge, and difficult to get it to work right [12:42] it was easier to just write the parser by hand [12:42] it's not that large after all (just the cfg_next_token function, really) [12:42] <_ion> Ok. === gbutler69 [n=gbutler6@pseudo220.jewels.com] has joined #upstart [12:45] On Ubuntu 6.10 can one create a config that will cause Upstart to start/stop in.telnetd as needed (instead of running inetd/xinetd)? [12:46] Anyone? [12:46] not in 6.10, no; the upstart version there has no facility to replace inetd === Seveas [n=seveas@ubuntu/member/seveas] has joined #upstart [12:49] <_ion> racc is quite nice, there's a backend class (written in C for speed) in the ruby standard library; the generated parser files don't contain extra crud, they just subclass Racc::Parser. [12:51] <_ion> I'll try to get the graphviz thingy done some day. :-) [12:52] KeyBuk: Thanks....that's what I was looking for? Out of curiosity, when will this support exist (planned)? [12:52] gbutler69: ubuntu 7.10, I would guess [12:57] it's not planned for upstart 0.3, which is aimed for Ubuntu 7.04 [01:01] KeyBuk: OK, thanks.... [01:02] that's not to say it won't happen, if someone codes it [01:02] of course [01:02] That was my next question.... [01:02] Need a volunteer to work on that? [01:03] patches are always welcome [01:03] OK...I think I'll start taking a look at it....probably won't get to it much until after the Holiday though....:) [01:04] I'm hoping to get some upstart hacking done over the holiday [01:05] will be my main chance to do it [01:07] Should "upstartd" just listen for connections in place of "inetd/xinetd" or should replacement "indetd" be create that is part of the "upstart" package and it triggers the "connection received on port XX" events? [01:09] Any vision for this yet? [01:15] (...vague gut feeling: pid #1 shouldn't have net connections :p) === gbutler [n=gbutler@69-168-169-204.clvdoh.adelphia.net] has joined #upstart === j_ack_ [n=rudi@p508D9348.dip0.t-ipconnect.de] has joined #upstart [03:20] If I want to work on the "replace inetd functionality" for upstart, where should I begin documenting/proposing the how, why, and what? [03:30] I'd like to start work on the spec for Upstart handling "inetd" events/traffic. [03:31] I can't seem to figure out the "Upstart Wiki" thing though. How does one go about editing/adding specifications to it? [03:31] <_ion> The wiki and the mailing list are good starting points. [04:09] I'm not totally sure it's worth replacing inetd. [04:09] I mean, honestly, inetd works fine. [04:09] Or xinetd, whichever one you want. [04:09] I doubt any of us want to tackle that complete code base (again) [04:10] Maybe scott just can't wait, though. =) [04:13] wasabi_: Yes, I agree. I created a "lauchpad" entry and a spec placeholder. For the "Rationale" I put a lot of questions which basically all equate to, "Do we REALLY want upstart to replace inetd/xinetd?" === maro [n=mark@0x55511dab.adsl.cybercity.dk] has joined #upstart [04:14] I figure it enough "Rationale" can be found, then maybe it's worth doing....but, as I sat trying to think of reasons, I couldn't come up with anything other than, "We'd like upstart to be the central place for Job Control". === gbutler [n=gbutler@69-168-169-204.clvdoh.adelphia.net] has left #upstart [] === Amaranth [n=travis@unaffiliated/amaranth] has joined #upstart === peeps [n=peeps@cpe-70-112-25-110.austin.res.rr.com] has joined #upstart === psibox [n=dreger@smart.physik.fu-berlin.de] has joined #upstart === ced_ [n=ced@n220246132035.netvigator.com] has joined #upstart [09:50] hey [09:58] where can i find the upstart manual? man upstart does not return anything === Md [i=md@freenode/staff/md] has joined #upstart === Keybuk [n=scott@syndicate.netsplit.com] has joined #upstart === j_ack [n=rudi@p508D9359.dip0.t-ipconnect.de] has joined #upstart [05:22] hmm [05:22] IMO inetd functionality shouldn't be added [05:22] <_ion> Why not? [05:22] it's a bit dangerous to have process 1 handling internet connections - if there was security flaw, it would be easy to bring down the system [05:23] correct me if i'm wrong, though [05:23] <_ion> Since when is process 1 going to handle network connections? [05:23] if inetd functionality is added... [05:23] <_ion> It's not as if it's going to be added to /sbin/init :-) [05:23] <_ion> init just launches stuff based on events. [05:23] hmm [05:23] :P [05:24] +(...vague gut feeling: pid #1 shouldn't have net connections :p) << Keybuk said the same ;) [05:24] <_ion> I believe everybody has that feeling. :-) === theCore [n=alex@ubuntu/member/theCore] has joined #upstart === juergbi [n=juerg@80-219-26-249.dclient.hispeed.ch] has joined #upstart [09:31] <_ion> keybuk: 'on foo and bar' will upstart accumulate received events that match, and change the goal to 'start' when foo_received & bar_received == true? Will the accumulation of those events then be stopped until the goal is 'stop' again? [09:32] yes to the first part [09:33] when "foo" occurs, that node in the graph will be TRUE [09:33] and when "bar" occurs, that node in the graph will also be TRUE [09:33] the "and" parent node of both is TRUE only once both children are TRUE [09:33] I'm not sure what the next bit suggests? [09:34] <_ion> I mean: [09:34] <_ion> on foo and bar [09:34] <_ion> stop on quux [09:34] <_ion> Let's 'foo', 'bar' are received, and then 'quux' is received. [09:34] <_ion> +say [09:34] right [09:34] the goal will be stop, job will be stopped [09:35] the complex tree will be TRUE, but won't be evaluated, so won't cause the goal to change yet [09:35] <_ion> What i meant with the second question is that after the goal is set to stop, the state of 'on foo and bar' should be false again, until foo and bar are received again, right? [09:37] no [09:37] the state is TRUE [09:37] both events have occurred, as prescribed [09:37] <_ion> All right. [09:37] to explain why [09:37] imagine foo is "fhs-filesystem-up" [09:37] and bar is "network-up" [09:37] and quux is "network-down" [09:38] if the job is stopped when the network is down, you don't want to have to wait until the filesystem goes down and up as well [09:38] you just want it restarted when the network comes up [09:39] the way to cause the tree to be reset to FALSE is to use "untilo" [09:39] (foo and bar) until quux [09:39] now, when quux occurs, the other side of the tree is explicitly set to false [09:39] foo and bar both have to occur again [09:40] <_ion> So the boolean value of 'on fhs-filesystem-up and network-up' will be calculated when (and only when) either 'fhs-filesystem-up' or 'network-up' is received, and if it amounts to TRUE, the goal will be changed to start? [09:41] yes [09:41] <_ion> Ok, now i understand it. :-) [09:41] the tree is evaluated upwards each time a node is changed [09:44] <_ion> Is 'on fhs-filesystem-up and network-up' equivalent to 'start on fhs-filesystem-up and network-up'? [09:45] err? [09:45] no === che [n=bleh@redhat/che] has joined #upstart [09:49] <_ion> Sorry, i don't see the difference. I've probably misinterpreted or misread something from the complex-event-config doc. [09:49] that would match an fhs-filesystem-up event with the arguments "and" & "network-up" ? [09:49] <_ion> Hmm. [09:50] <_ion> How to match something with the argument 'and' from an 'on' or 'until' expression? :-) [09:51] what do you want to match [09:51] describe the state [09:56] <_ion> That was just a hypothetical example. What i'm really thinking is making 'and' a reserved word something that can't be matched and changing the 'start on' expression to what is defined as 'on' in complex-event-config. Perhaps make it possible to match a reserved word as follows: start on foo "and" bar [09:57] the trouble is that the complex expression also defines when things stop [09:57] not just when they start [09:57] so "start on network-up until network-down" makes no sense [09:57] which is why we decided it was separate from start on/stop on [09:57] <_ion> I thought it was "from network-up until network-down" [09:57] like I said, it makes no sense to allow that for start [09:57] from/on are just syntactic sugar [09:58] network-up until network-down [09:58] (where until is the joining operator) [09:58] network-up until network-down and fhs-up until fhs-down [09:58] block-device-added and network-up until network-down [09:58] ^ block device added while there's a network [09:59] the complex config is intended to be a discreet thing to start on/stop on [09:59] with the latter just "easy options" [10:00] <_ion> Ok, i see. [10:00] maybe it's not clear in the spec [10:00] or maybe it just doesn't make sense for it to behave this way [10:01] the problem we wanted to avoid was this: [10:01] start on network-up and fhs-filesystem-up [10:01] stop on network-down and fhs-filesystem-down [10:01] <_ion> So basically 'on' and 'from' are just ignored, but they are necessary in the beginning of a line? [10:01] on startup, both network-up and fhs-filesystem-up happen [10:01] then the network goes down, so network-down happens [10:02] (err, that latter should be "stop on network-down OR fhs-filesystem-down", sorry) [10:02] so the job stops [10:02] but the "network-up and fhs-filesystem-up" bit is still TRUE (those events have both happened) [10:03] so if you get fhs-filesystem-down followed by fhs-filesystem-up [10:03] the job will get started, despite the network not being up [10:03] that's what "until" is for [10:03] "network-up until network-down" explicitly states that the fact network-up has happened is forgotten once network-down happens [10:04] and once you have that, you can't easily express that in terms of start or stop [10:04] because it says both [10:11] <_ion> Thanks for explaining. [10:11] does that make sense? [10:11] is it crack? [10:22] <_ion> I agree with almost everything, only the syntax could be a bit cleaner IMHO. I'd replace 'on' and 'from' with 'SOMESTANZA ' where expr is a combination of '', ' and ', ' or ', ' until ', 'with '. Also 'with ' wouldn't be a valid line without the 'SOMESTANZA' in front of it. [10:24] ok [10:24] what's a suitable SOMESTANZA? [10:25] <_ion> Still thinking of that. :-) [10:25] <_ion> It should be short and self-descripting. [10:26] the language for that syntax has caused us issues :) e.g. "and" behaves more an intersection [10:26] where as "A until B and C until D" in English implies a union [10:27] and the English "A until B or C until D" implies a difference :) [10:28] <_ion> Actually, 'on' *is* quite good, but IMHO it should not be allowed inside , and 'from' being an alias for it causes confusion. [10:29] <_ion> I would change [10:29] <_ion> from network-up until network-down [10:29] <_ion> and from fhs-mounted until fhs-unmounted [10:29] <_ion> to: [10:30] <_ion> on network-up until network-down \ [10:30] <_ion> and fhs-mounted until fhs-unmounted [10:30] <_ion> Or instead of using a \ put the expression (after 'or') in parenthesis. [10:31] <_ion> I mean after 'on' [10:31] is 'from' not better than 'on' ? [10:35] <_ion> I think there should only be one stanza, no aliases. I'm not sure whether it should be 'on' either. The syntax should allow any of the following: [10:35] <_ion> FOO some-event [10:35] <_ion> FOO network-up until network-down and fhs-mounted until fhs-unmounted [10:35] <_ion> FOO with apache or with httpd [10:35] and get rid of "stop on" entirely? [10:36] <_ion> "start on " and "stop on " would still be there for simple event config, but "FOO " would be added for complex event config. [10:39] <_ion> line : 'start on' EVENT | 'stop on' EVENT | 'FOO' expression | ... ; [10:39] <_ion> expression : EVENT | expression 'and' expression | expression 'or' expression | expression 'until' expression | with JOB | '(' expression ')' ; [10:39] <_ion> Or something like that. [10:39] ok [10:39] that's pretty much what I was going for :) [10:40] just gotta pick a FOO [10:40] and get rid of the on/from bit [10:40] <_ion> Whoops, s/with/'with'/ [10:42] the reason for allowing multiple 'on's was to allow: [10:42] on foo and [10:42] on bar [10:42] without requiring [10:42] on foo and \ [10:42] on bar [10:42] (ie. \ avoidance) [10:48] <_ion> Perhaps ignore a newline after and/or/until/with? [10:48] <_ion> FOO network-up until network-down and [10:48] <_ion> fhs-mounted until fhs-unmounted [10:55] perhaps === j_ack [n=rudi@p508D9359.dip0.t-ipconnect.de] has joined #upstart