[13:17] sadmac2: unless I'm mistaken [13:18] you've not described anything new, just used a different language to describe what we were already talking about [13:18] *and* haven't actually solved the filesystem mounting "problem" as defined [13:19] lit. that it is not possible to do native upstart mounting of filesystems _without_parsing_fstab_to_create_the_states/jobs_ [13:20] also you don't appear to solve the /usr/local must be mounted after /usr issue (but there's no pitfall either, since you parse fstab you can work out whether you need a dep) [15:46] Keybuk: that its mostly the same is a good thing. Most of what's new is the rigor: its very meticulously defined. The other new thing is the very freeform way deps work. st(a: 1, *) -> b() and st(c: 1, *) -> d() means st(a: 1) depends on b(), st(c: 1) depends on d(), and st(a: 1, c: 1) depends on b() /and/ d() [15:48] Keybuk: for the mountpoint issue we can just add one dep: mounted(mountpoint: %1) -> file_exist(name: %1) [15:49] that state would have to be a bit special internally but its not hard to write [15:50] but you do have to preparse fstab [15:51] Keybuk: I don't know that a lot of that information is defined anywhere else. You could rely on disklabels being equal to the mountpoint, but that's not good [15:56] still doesn't help [15:56] so we still need a binary to parse fstab and create upstart states/events/jobs for the information there [15:57] which is pretty much where I got to :p [15:57] the only real question is how much of that binary is logic only [15:57] and how much is implementation [15:57] ie. does it just say "when you see blah, run the upstart job blah" [15:57] or does it actually define what the upstart job is (fsck on ...) [15:57] Keybuk: I don't think we need a binary [15:58] Keybuk: its just a few calls to getmntent() [16:00] so you need a binary [16:00] Keybuk: why put that in another application? its 3 lines of code [16:00] where else would you put it? [16:00] it's not something I'd want to hardcode into init [16:01] Keybuk: it could essentially go in the state machine [16:01] only if init parses fstab [16:01] which is just wrong ;) [16:01] Keybuk: ah, but the state machine isn't /in/ init anymore, remember? [16:01] especially if you wanted to develop a system that did rely on lvm labels, or btrfs, etc. [16:01] * Keybuk still doesn't think that's possible [16:02] its more than possible. its easy [16:03] Init only needs 2 dbus methods (strictly speaking. there may be good cause for more): [16:03] init.run(handle, script, script_on_fail) [16:03] init.stop(handle) [16:05] when a state comes up that corresponds to a job, it calls init.run("name_of_state(args: foo)", "exec /sbin/mytask", "emit failed job=$HANDLE") [16:06] when the state machine gets a failed event, it downs the state matching the job argument thereof [16:07] you're probably not putting /enough/ in userspace the way you're picturing it. Pid 1 is now just a glorified bash shell with really good session management [16:07] (and dbus instead of stdin) === notting_ is now known as notting [19:04] you know that pid 1 is in userspace, right? :p [19:04] I don't see what your split buys us, except a much more complex code base [19:06] Keybuk: yeah, whatever the hell you call it :) [19:07] Keybuk: the split is good for separation of concerns. From outside of the two, jobs are states, but from within, the state machine doesn't really know there's such a thing as jobs and the service manager doesn't know anything about states [19:08] but it doesn't work ;) [19:08] the two become so closely coupled, that you're inherently more inefficient by having the split [19:08] Keybuk: They're pretty decoupled the way I set it up abouve [19:08] *above [19:09] pid 1 would have only one method [19:09] exec() [19:09] takes a command, returns a handle [19:09] that handle/object would have only one signal complete() [19:09] and only one method stop() [19:09] complete would say what exit code, or signal, etc. [19:09] stop would send TERM/KILL [19:09] -- [19:10] which means it's incapable of doing anything on its own [19:10] the pid 2 would have the full state machine [19:10] but to do anything has to invoke all the methods and listen to signals on 2 [19:10] on 1, even [19:10] it can't do anything automated on its own [19:10] this does not make anything simpler, it makes it much more difficult [19:11] it costs little to invoke those methods [19:11] it costs impossibly more than just having a C method call to do it [19:12] bear in mind as well that pid 1 is the pid that knows about forks and children dying [19:12] right [19:12] so even a status() call needs additional methods/signals to talk between the two [19:12] I don't see that this makes anything better [19:15] status is either starting,started,stopping,or stopped [19:15] that works from the previous mechanism [19:16] the state machine only thinks about the service being in two of those: started and stopped [19:16] so pid 1 needs a state machine [19:16] in fact, pid 1 needs *the* state machine [19:16] so what is pid 2 doing? :p [19:17] pid 2 = generate a list of what is supposed to be running. pid 1 = make the system reflect that, and scream when this is impossible. [19:17] I don't think you're buying anything by separating the two [19:17] except complexity for no good reason [19:20] I want the two to be decoupled in the design. [19:20] If they're in the same process or not. [19:22] they're decoupled in the *current* design (0.3/0.5) [19:22] they're in different .c files, after all [19:25] if you look at the state machine as nothing but mathy bits and lights turning red and green; that is to say if you ignore the fact that programs are supposed to be started/stopped in relation to it, you should be able to add /exactly/ 3 things to it and have it able to manage services [19:26] 1) rising edge actions: some arbitrary piece of code that is run when a state becomes up [19:26] 2) falling edge actions: the same run when a state becomes down [19:27] 3) fail-on events: the ability to have an event cause a state to go from up to down /without/ running the falling edge actions [19:27] err [19:27] but we're not writing a mathy state machine [19:27] we're writing something that programs are started and stopped by [19:27] I think it's dangerous to try and think the two are unrelated [19:29] the state machine is unrelated to the services in the sense that the strings and integers you use in your program are unrelated to the electrical charges on the bits of sillicon in the box under your desk. [19:30] you mean they're the same thing? [19:30] which I think is my point [19:31] I don't think they're the same thing. In a sense the first doesn't even exist. [19:32] services *are* the states [19:32] for some value of services [19:33] states don't have a pid, or a vm area, or a task_struct, or signal handlers.... [19:33] states are conditions. they are true or false values [19:34] you shouldn't need any system calls to set something to true or false [19:34] it being true is dependant on syscalls having been run [19:35] likewise it becoming false again is also dependant on that [19:35] true [19:35] but states don't /fail/ [19:35] they can become false for any of umpteen reasons [19:35] but there's no real "break" [19:38] I think you're thinking too much in terms of mystate and thystate [19:38] you need to think about dbus and apache [19:38] mystate and thystate is a trivial problem [19:38] dbus and apache are not [19:38] but making dbus and apache /appear/ like mystate and thystate is [19:39] so its two trivial problems or one complicated one [20:26] any way to speed up ubuntu boot process? I'm open to testing new things [20:44] roll it down a hill? [20:45] Overclock the modem. [20:46] Value Add! === Turl1 is now known as TUr1 === TUr1 is now known as Turl1 === Turl1 is now known as Turl === Turl1 is now known as Turl === notting_ is now known as notting [22:10] Keybuk: hi