=== Keybuk changed the topic of #upstart to: Upstart 0.6.6 "No, she's dead, this is her son" | http://upstart.ubuntu.com/ | Upstart Q&A Session Video http://blip.tv/file/3606758 | Kernel and Upstart 1000UTC #ubuntu-uds-cocobolo-2 http://icecast.ubuntu.com:8000/cocobolo-2.ogg.m3u | see http://summit.ubuntu.com/uds-m [08:31] last day! \o/ === Keybuk changed the topic of #upstart to: Upstart 0.6.6 "No, she's dead, this is her son" | http://upstart.ubuntu.com/ | UDS Videos | Upstart Q&A http://blip.tv/file/3606758 | Desktop & Upstart http://blip.tv/file/3621723 === Keybuk changed the topic of #upstart to: Upstart 0.6.6 "No, she's dead, this is her son" | http://upstart.ubuntu.com/ | UDS Videos | Upstart Q&A http://blip.tv/file/3606758 | Desktop & Upstart http://blip.tv/file/3621723 | Plenary Talk http://blip.tv/file/3622104 (~15 min in) [14:08] keybuk: Woot, a video site you can use without flash and with your video player plugin of choice. Awesome. [14:09] I know, yet people complain that it's h.264 [14:31] Keybuk: nice shoes [14:31] :D [14:31] which one are you watching? [14:33] Keybuk: desktop one, because that one worked for me with streaming [14:33] (gstreamer on fedora seems to keep hanging. The traces lead in to pulseaudio. Imagine my surprise.) [14:34] fortunately Lennart is working full time on pulseaudio [14:34] and isn't spending all his time on anything more critical [14:34] :-P [14:35] Keybuk: The one thing I've yet to understand is how multiple instances will behave in 1.0 [14:36] configs and jobs are separated, and there are rules for how jobs are created from configs [14:36] one of those rules says that for each named state in the "while" clause, a job is created [14:37] so if you have a state with two instances [14:37] then you also have two instances of everything that is running in that state [14:37] so it's recursive [14:37] (with an "any" semantic) [14:37] multi-instance states are created automatically for things like devices, files, etc. [14:38] so if you have while a and b, and you have two of a and two of b, you'd get 4 of that job? [14:38] err, you would have two [14:38] sorry, misread [14:38] if there's two a, and two b [14:38] you'd get four, yes [14:39] one for a1 and b1 [14:39] one for a1 and b2 [14:39] one for a2 and b1 [14:39] one for a2 and b2 [14:39] consider "a" being users, and "b" being user sessions [14:39] or "a" being network devices, and "b" being users [14:39] the first one of those is broken [14:40] I have an instance of metacity for my user on my neighbor's user session? [14:40] metacity is an application, not a service [14:40] yeah I meant a/b being computers/seats [14:40] been a long week [14:40] pulseaudio teh [14:40] *then [14:41] right, if a is users, and pulseaudio is while a [14:41] then you get two pulses for two users [14:41] screensaver! [14:42] if a is sessions, and screensaver is while a, you get once screensaver for each [14:42] errrgh. I know I can break it, hold on... [14:44] and example [14:44] well there's the kludgy case of apache existing for every device in the system if it has while net-device-up [14:44] you have a type of device that needs a program to connect to each one [14:44] and you have multiple users [14:44] so you'd need one for each device for each user [14:44] thus the while/and behaviour [14:44] kludgy case => apache would use "while any network-device" type thing [14:45] so it doesn't matter how many network devices come up [14:45] (it may be that "any" is default and "each" requires stanza) [14:45] so while network-device [14:45] foreach a and foreach b [14:45] that's just arguing sugar vs. hcfs [14:45] how can I fix "The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs." ? [14:46] hfcs even [14:46] barefoot: upstart jobs can have lsb headers [14:46] indeed, for the case of a distribution migrating from one to the other, it's probably a good idea [14:46] if the upstart jobs obey runlevel behaviour [14:46] Keybuk: the any stanza solves it for me. [14:47] sadmac: I'm still not sure which I like better [14:47] Keybuk: either one solves the issue. As long as there's the distinction and the explicitness. [14:47] right [14:47] I was thinking about the semantics of something like “task, on tree-changed /foo/bar and every 5 minutes”; how about this: each time either event occurs, it sets a flag true for the event in question in the job’s “on” tree, and whenever the job is in the stopped state the next time, if the tree evaluates to true, the flags are zeroed and the job is started. So, whenever both events happen again after the job was started the last time, the job will be ... [14:48] ... started again. If the job is already running, it will be restarted whenever it stops. [14:49] makes some amount of sense [14:49] kinda watershedy [14:49] Keybuk: hmm, k, guess ill look at the docs and write a new conf for /etc/init for this [14:50] Indeed, watershed was exactly what i was thinking of, but combined with the support for boolean operators. “on tree-changed /foo/bar or tree-changed /foo/baz”: if either path changes after the job was started the last time, the “on” tree will evaluate to TRUE and the job will be started whenever it is in the stopped state. [14:51] Keybuk: do you have plans to implement the "open the daemon's listening socket" stuff in upstart? [14:51] Md: yes, same plans I've always had [14:52] cool. for me it's the major selling point of systemd, and I expect that many other believe the same [14:52] yeah, but it's broken if you *just* do it that way [14:52] how do you plan to do it? [14:52] Apple only get away with it because they control the entire stack [14:53] so can avoid the circular dependencies [14:53] Linux has *hundreds* of circular dependencies [14:53] and you end up with three or more processes blocking on each other [14:53] and since the init system knows nothing about them, it can't do anything about it [14:53] do you have some examples? [14:54] I think the one I hit when I tried to boot Ubuntu with launchd pre-Upstart was NM, D-Bus, HAL, dhclient, wpasupplicant and the dhcdbd thing [14:54] they ended up wedged [14:54] but there's plenty [14:54] the how: [14:54] a config will be able to specify ports/sockets/etc. to listen on [14:54] these will be combined with the "while" [14:55] so the socket only exists once the while is true (rather than always) [14:55] on connection, start the service, pass the socket [14:55] usual expectation [14:55] ignore the socket while the service is running [14:55] but most interesting, this can also be combined with other upstart events [14:55] does this still allow starting daemons on demand? [14:55] like start a service when the system is idle on boot, or on initial connection (whichever comes first) [14:56] yes [14:56] you can still have a service that only has a "listen" [14:56] or have a service with only "while" [14:56] do you already have a timeframe for implementing this? [14:56] but both is supported too [14:56] yes, next 6 months [14:56] BTW, a problem I have found with systemd and which I am not sure Lennart is ready to solve is daemons which need to bind to a specific IP/interface [14:56] oh, and also, upstart will support things like "not when on battery" [14:57] and "not when the system load is high" [14:57] and "not when we need to conserve power" [14:57] which get very nice when combined with on demand things [14:57] so you won't be able to on-demand start something if it's inhibited because the system is low on power, or doing updates, etc. [14:58] Md: right :) I'd planned to do that out of the box [14:58] how? [14:58] Upstart gets an event when the network comes up ;) [14:58] it can use those itself; in this case to begin listening on that IP [14:58] when the IP concerned goes down, it would stop [14:58] does it now? I remember we discussed this and I planned to write a child daemon to do it but I never even checked out the source... [14:59] "when the IP concerned goes down, it would stop" is tricky because in some situations you want to move an IP address between different interfaces (e.g. wired/wireless) and not kill the daemon [15:02] if NetworkManager consumes everything, it could signal those states safely [15:03] * sadmac is now wearing a complete Stig costume which arrived in the mail a few minutes ago [16:39] Note to self: talk to Keybuk about ssh-agent: you don’t actually need to get environment variables from ssh-agent’s output and inject them into the user session. Just do [16:39] while user [16:39] env SSH_AUTH_SOCK=/var/run/ssh-agent/$USER/agent [16:39] exec ssh-agent -a "$SSH_AUTH_SOCK" [16:40] He probably has figured this already, but anyhoo [16:40] while-around user, actually, for the lack of a better stanza. :-P === Will| is now known as Erb