/srv/irclogs.ubuntu.com/2008/03/11/#upstart.txt

Keybuksadmac_: yes01:20
Keybukthough in 0.3.x it will probably contain the event that stopped the job01:21
Keybukwhereas in trunk, UPSTART_EVENTS will contain the events that originally started it01:21
keesjHi12:08
Keybukhi12:16
keesjThe chance I wil use upstart are growing every day :p12:24
keesjI am now looking into the kernel->upstart communication12:25
keesjspecial I am looking at the udev from the replacement-initscripts http://paste-it.net/7162/raw/12:28
keesjthat script has a "emits block-device-added block-device-removed" section12:29
keesjwhat it that good for?12:32
Keybuk"emits" is just a documentation stanza12:32
Keybukyou'd use it in the job definitions of services that are known to emit their own events12:33
Keybukand that way other frontend tools can draw pretty dependency graphs using things like dotty12:33
keesjsexy :p12:33
Keybukit's not actually used by Upstart in any way, other than being available as a property12:33
Keybukthe theory there is that that distribution would ship udev rules that looked something like:12:34
Keybuk  SUBSYSTEM=="block", ACTION=="add", RUN+="/sbin/initctl emit block-device-added DEVPATH"12:34
Keybuk  SUBSYSTEM=="block", ACTION=="remove", RUN+="/sbin/initctl emit block-device-removed DEVPATH"12:34
Keybuk  SUBSYSTEM=="net", ACTION=="add", RUN+="/sbin/initctl emit network-device-added INTERFACE"12:35
Keybuk  SUBSYSTEM=="net", ACTION=="remove", RUN+="/sbin/initctl emit network-device-removed INTERFACE"12:35
Keybuketc.12:35
Keybukalternately we may want an upstart-addon-udev or something so we could have a generic RUN+="socket:/com/ubuntu/upstart/udev" at the end, and let the addon daemon turn those into events12:35
KeybukOR we might just patch udev directly to emit events into upstart12:35
keesjmy system does not use udev, i currently use <linux/netlink.h> to recieve NETLINK_KOBJECT_UEVENT events12:37
keesjI could just create a mini app that gets started and emits the kernel uevent12:38
keesjhmm I will look into it 12:40
Keybukright12:43
Keybukyou could have a little daemon to listen on the netlink socket and inject into upstart12:43
keesjI do have the same kind of problems that are solved by udev , being that if a device get plugged before the daemon is started I will never know about12:44
keesjI then have to write custom code to look at the status .12:45
Keybukwhy not just write to the uevent files like udev does?12:56
Keybukfor each object under /sys that a uevent was originally emitted for, there will be a uevent file12:56
Keybukwrite "add" (no \0, no \n, etc.) to that, and the kernel will resend it12:56
keesjThanks for the tip , I will have to look into how that works!13:03
Keybukion_: interesting thought of the day19:12
Keybukall of the dbus_bus_ calls block19:12
ion_keybuk: Is that a problem?19:17
KeybukI'm not sure19:18
Keybukthe fact that dbus_bus_get() can never return worries me enough :p19:20
ion_Heh19:20
KeybukI guess it depends at what level of blocking we have to worry about in Upstart19:23
Keybukin some senses, blocking is actually not necessarily bad19:24
Keybuksince it reduces system load19:24
Keybuke.g. upstart blocks while it sets up a process, even though that's happening the child19:24
Keybukand doesn't move onto the next until exec() completes19:24
Keybukso arguably, after starting dbus, blocking to connect to it and say Hello isn't too bad19:24
ion_Yep...19:40
ion_Don’t they have a separate DBus (client) implementation in C#? Perhaps someone should NIH a DBus implementation that doesn’t suck in C. ;-)19:56
Keybukndesk-dbus19:56
Keybukthe C API isn't really that bad20:01
Keybukthe main problem is just figuring out how to dispatch methods20:01
keesjion_: that would be great20:14
Amaranth@btlogin21:17
Amarantherr21:17

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