/srv/irclogs.ubuntu.com/2010/05/14/#upstart.txt

=== 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
Keybuklast day! \o/08:31
=== 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)
ionkeybuk: Woot, a video site you can use without flash and with your video player plugin of choice. Awesome.14:08
KeybukI know, yet people complain that it's h.26414:09
sadmacKeybuk: nice shoes14:31
Keybuk:D14:31
Keybukwhich one are you watching?14:31
sadmacKeybuk: desktop one, because that one worked for me with streaming14:33
sadmac(gstreamer on fedora seems to keep hanging. The traces lead in to pulseaudio. Imagine my surprise.)14:33
Keybukfortunately Lennart is working full time on pulseaudio14:34
Keybukand isn't spending all his time on anything more critical14:34
ion:-P14:34
sadmacKeybuk: The one thing I've yet to understand is how multiple instances will behave in 1.014:35
Keybukconfigs and jobs are separated, and there are rules for how jobs are created from configs14:36
Keybukone of those rules says that for each named state in the "while" clause, a job is created14:36
Keybukso if you have a state with two instances14:37
Keybukthen you also have two instances of everything that is running in that state14:37
Keybukso it's recursive14:37
Keybuk(with an "any" semantic)14:37
Keybukmulti-instance states are created automatically for things like devices, files, etc.14:37
sadmacso 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
Keybukerr, you would have two14:38
Keybuksorry, misread14:38
Keybukif there's two a, and two b14:38
Keybukyou'd get four, yes14:38
Keybukone for a1 and b114:39
Keybukone for a1 and b214:39
Keybukone for a2 and b114:39
Keybukone for a2 and b214:39
Keybukconsider "a" being users, and "b" being user sessions14:39
Keybukor "a" being network devices, and "b" being users14:39
sadmacthe first one of those is broken14:39
sadmacI have an instance of metacity for my user on my neighbor's user session?14:40
Keybukmetacity is an application, not a service14:40
Keybukyeah I meant a/b being computers/seats14:40
Keybukbeen a long week14:40
sadmacpulseaudio teh14:40
sadmac*then14:40
Keybukright, if a is users, and pulseaudio is while a14:41
Keybukthen you get two pulses for two users14:41
Keybukscreensaver!14:41
Keybukif a is sessions, and screensaver is while a, you get once screensaver for each14:42
sadmacerrrgh. I know I can break it, hold on...14:42
Keybukand example14:44
sadmacwell there's the kludgy case of apache existing for every device in the system if it has while net-device-up14:44
Keybukyou have a type of device that needs a program to connect to each one14:44
Keybukand you have multiple users14:44
Keybukso you'd need one for each device for each user14:44
Keybukthus the while/and behaviour14:44
Keybukkludgy case => apache would use "while any network-device" type thing14:44
Keybukso it doesn't matter how many network devices come up14:45
Keybuk(it may be that "any" is default and "each" requires stanza)14:45
Keybukso while network-device14:45
Keybukforeach a and foreach b14:45
Keybukthat's just arguing sugar vs. hcfs14:45
barefoothow 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:45
Keybukhfcs even14:46
Keybukbarefoot: upstart jobs can have lsb headers14:46
Keybukindeed, for the case of a distribution migrating from one to the other, it's probably a good idea14:46
Keybukif the upstart jobs obey runlevel behaviour14:46
sadmacKeybuk: the any stanza solves it for me.14:46
Keybuksadmac: I'm still not sure which I like better14:47
sadmacKeybuk: either one solves the issue. As long as there's the distinction and the explicitness.14:47
Keybukright14:47
ionI 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:47
ion... started again. If the job is already running, it will be restarted whenever it stops.14:48
Keybukmakes some amount of sense14:49
Keybukkinda watershedy14:49
barefootKeybuk: hmm, k, guess ill look at the docs and write a new conf for /etc/init for this14:49
ionIndeed, 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:50
MdKeybuk: do you have plans to implement the "open the daemon's listening socket" stuff in upstart?14:51
KeybukMd: yes, same plans I've always had14:51
Mdcool. for me it's the major selling point of systemd, and I expect that many other believe the same14:52
Keybukyeah, but it's broken if you *just* do it that way14:52
Mdhow do you plan to do it?14:52
KeybukApple only get away with it because they control the entire stack14:52
Keybukso can avoid the circular dependencies14:53
KeybukLinux has *hundreds* of circular dependencies14:53
Keybukand you end up with three or more processes blocking on each other14:53
Keybukand since the init system knows nothing about them, it can't do anything about it14:53
Mddo you have some examples?14:53
KeybukI 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 thing14:54
Keybukthey ended up wedged14:54
Keybukbut there's plenty14:54
Keybukthe how:14:54
Keybuka config will be able to specify ports/sockets/etc. to listen on14:54
Keybukthese will be combined with the "while"14:54
Keybukso the socket only exists once the while is true (rather than always)14:55
Keybukon connection, start the service, pass the socket14:55
Keybukusual expectation14:55
Keybukignore the socket while the service is running14:55
Keybukbut most interesting, this can also be combined with other upstart events14:55
Mddoes this still allow starting daemons on demand?14:55
Keybuklike start a service when the system is idle on boot, or on initial connection (whichever comes first)14:55
Keybukyes14:56
Keybukyou can still have a service that only has a "listen"14:56
Keybukor have a service with only "while"14:56
Mddo you already have a timeframe for implementing this?14:56
Keybukbut both is supported too14:56
Keybukyes, next 6 months14:56
MdBTW, 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/interface14:56
Keybukoh, and also, upstart will support things like "not when on battery"14:56
Keybukand "not when the system load is high"14:57
Keybukand "not when we need to conserve power"14:57
Keybukwhich get very nice when combined with on demand things14:57
Keybukso 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:57
KeybukMd: right :)  I'd planned to do that out of the box14:58
Mdhow?14:58
KeybukUpstart gets an event when the network comes up ;)14:58
Keybukit can use those itself; in this case to begin listening on that IP14:58
Keybukwhen the IP concerned goes down, it would stop14:58
Mddoes 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:58
Md"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 daemon14:59
sadmacif NetworkManager consumes everything, it could signal those states safely15:02
* sadmac is now wearing a complete Stig costume which arrived in the mail a few minutes ago15:03
ionNote 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 do16:39
ionwhile user16:39
ionenv SSH_AUTH_SOCK=/var/run/ssh-agent/$USER/agent16:39
ionexec ssh-agent -a "$SSH_AUTH_SOCK"16:39
ionHe probably has figured this already, but anyhoo16:40
ionwhile-around user, actually, for the lack of a better stanza. :-P16:40
=== Will| is now known as Erb

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!