/srv/irclogs.ubuntu.com/2007/10/28/#upstart.txt

ArafangionHey guys, how do I send an event whenever my eth0 becomes up?01:53
Keybukhello01:56
KeybukArafangion: initctl emit01:56
Keybuk(simple answer)01:56
ArafangionKeybuk: yes, where exactly do I put that?01:56
ArafangionMy networking job does '/sbin/ip link set eth0 up', but it is only some time later that eth0 actually becomes up.01:57
KeybukArafangion: I cannot answer that question without detailed knowledge of how your distro of choice manages its network interfaces01:57
ArafangionKeybuk: It's custom, without sysv compatibility.01:57
Keybukthen only you can answer that question01:58
Keybukyou might have something like Network Manager01:58
Keybukor at least HAL or udev01:58
ArafangionKeybuk: I have udev, I have yet to install HAL.01:58
ArafangionDo I need HAL?01:58
Keybukudev would tell you when the interface comes UP01:58
ArafangionWould udev be able to send the event?01:59
Keybukthat wouldn't tell you whether it was configured or not01:59
Keybukonly something like Network Manager could tell you that01:59
ArafangionHmm, so I'd pretty well need to setup HAL, and write a custom script to manage that?01:59
ArafangionFor now, I suppose I'll have to make do with a sleep 2 in the networking script.01:00
Keybuka Utopian Upstart install would look something like:01:00
Keybuk  Upstart as init01:01
Keybuk  D-BUS for IPC01:01
Keybuk  udev for kernel user-space management01:01
Keybuk  HAL for application management01:01
Keybuk  Network Manager dealing with network interfaces01:01
Keybuk  GNOME Power Manager dealing with ACPI/APM01:01
ArafangionI'll be doing something very similar. :)01:01
Keybukwe haven't figured out all the bits yet01:02
ArafangionMust be why the documentation is a bit sparse in some places. :)01:03
Keybukexactly01:03
KeybukUpstart 0.3 is, at best, a technology prototype/demo01:04
ArafangionI'm using upstart 0.3.8, with the install slightly patched to prevent broken symlinks.01:05
Keybuk0.3.9 fixes that, no?01:05
ArafangionHopefully. ;)01:05
ArafangionBut it wasn't fixed in 0.3.8, which was the version that was up-to-date when I tried it. :)01:06
Keybukyou're using program-prefix/suffix/transform and the symlinks aren't transformed01:06
ArafangionWhat?01:06
Keybuk?01:06
ArafangionNo, just two symbolic links that deal with sysv compatibility was created regardless of sysv compatibility being enabled or not.01:07
ArafangionA minor thing, really.01:07
Keybukoh01:07
KeybukI think that's fixed in 0.3.9 too01:07
Keybukyes01:07
ArafangionCool. :)01:07
ArafangionMaybe in a few months, I'll backup and check out the latest version of upstart. :)01:08
ArafangionI'm aiming to have a /very/ nice boot sequence.01:08
Arafangion(It's a laptop)01:08
ArafangionMy major fault with upstart so far is the diagnostics are a bit... raw.01:09
ArafangionIf I add a new job to /etc/events.d, it complains about 'init: //etc/event.d/foo: unable to read: Invalid argument', without really giving me much more info.01:10
ArafangionAlso seems to refer to a mythical /etc/event.d/4913, as well.01:10
Keybukvim01:11
Keybukit always makes a file called 4913 in whatever directory you're editing files01:11
Keybukso Upstart thinks it's a job01:11
Keybukand what other info do you expect there?01:12
KeybukThat's all the info Upstart *has*01:12
Keybukit tried to read a file, and it got EINVAL01:12
Keybukthough that's a bug :)01:12
Keybuk       EINVAL (since Linux 2.6.12), length was 0.01:12
Keybukyou should file that <g>01:12
ArafangionHeh. :)01:12
ArafangionI may be a dev, but I'm a *user* here. ;)01:13
ArafangionStill, it's complaining about /two/ files, really.01:13
ArafangionPerhaps a fix would be an upedit command, which makes a copy of the job in /tmp, then edits it with the preferred editor.01:14
Keybukor just don't use vim :)01:14
ArafangionDIE!01:14
Keybukit's not really an issue01:14
Keybuksince it'll read it properly in the end anyway01:14
Keybukit just tends to bitch a bit along the way01:14
ArafangionIt just makes things a bit confusing for us mortals. :(01:15
ArafangionI must say I've been rather impressed with the design of upstart, nice and small, and simple.01:16
ArafangionThat reminds me - how _do_ I get upstart to log itself verbositely to a file?01:16
Keybukfor things like that, I'd just rather fix the underlying problem01:16
Keybukyou can't01:17
Keybukthere's generally no filesystem to log *to* :-)01:17
ArafangionWell, it generally logs already, and that can be redirected, but how do I specify '-v' to init?01:17
Keybukkernel command line01:18
Keybukyou can give it --debug too for even more01:18
ArafangionSo, I do init=/sbin/init -v"01:18
Arafangion?01:19
ArafangionBut how would -v become associated with the init parameter?01:19
ion_Just add plain -v to the kernel command line.01:20
Keybukinit=/sbin/init -v01:21
Arafangionion_: And that wouldn't conflict with any other parameters any other programs want?01:21
Keybukkernel passes all parameters to init01:21
ArafangionOr is init always the last parameter?01:21
ArafangionAhh, I see.01:21
ArafangionHow come I haven't recieved my mail to the udev mailing list?01:22
Arafangion*upstart, not udev*01:22
Keybukare you subscribed to the list?01:23
ArafangionI believe so.01:24
ArafangionAnd I've responded to the latest email sent on that list.01:24
Arafangionupstart-devel01:24
Keybukit didn't hit the moderator queue01:26
ArafangionWas it blocked?01:28
ArafangionOh, *sigh*.01:28
Arafangion<censored> mail client.01:28
ArafangionIs the default reply to the user, nto the list?01:28
ArafangionHmm, evidently.01:30
Keybukuser01:40
ArafangionHmm, it's quite a moderated list. :)01:44
ArafangionProbably wise.01:44
Keybukit's not moderated01:48
Keybukjust limited to subscribers01:48
ArafangionWell, it says:     Post by non-member to a members-only list01:48
Arafangionyet I'm obviously a subscriber, since I recieved the email in the first place.01:48
ArafangionOh, my mistake.01:49
* Arafangion used a different email address.01:49
* Arafangion is feeling very 'newbie' today. :(01:50
KeybukI can accept that one01:53
ArafangionI do find it rather peculiar that ubuntu does not seem to use upstart's extra features - it's still entirely in sysv compatibility? (That correct?)01:55
Keybukright01:57
Keybukthat's correct01:59
Keybukwhy peculiar?01:59
ArafangionBecause I seem to suspect that the only reason why ubuntu wanted upstart was becuase "nothing else was good enough", yet they still do everything the same way.02:00
KeybukUpstart's still being developed02:01
ArafangionYes, there's that, I guess I'm just used to Debian. If it were debian, it'd already be starting to be integrated into the main distro properly, imho.02:03
ArafangionNot stable, mind you, it'd be in testing or unstable. ;)02:03
Keybuknot true02:05
Keybukyou can't integrate something unfinished02:06
Keybukyou have to finish it first02:06
Keybukespecially if the bits that aren't finished are the bits that let you integrate it02:06
ArafangionThat's what unstable and experimental are for. ;)02:07
ArafangionWhat are the current showstoppers for upstart, though?02:07
Keybukno02:09
Keybukunstable is for packages intended for release02:09
Keybukyou wouldn't put something there that simply doesn't boot02:09
Keybukexperimental, perhaps02:10
Keybukbut that's just a playground02:10
Keybukmain showstopper is that it's not possible to develop complex interdependencies between jobs02:10
Keybukor relate those to hardware02:10
ArafangionWhat's an example of such a complex interdependency?02:10
Keybuk<Arafangion> Hey guys, how do I send an event whenever my eth0 becomes up?02:11
Keybukfor example02:11
Keybuk:p02:11
ArafangionHeh, but arguably, it should be sufficient to have udev start a script that then does some monitoring, though it would indeed be even nicer if that was part of the job itself, as perhaps another stanza.02:13
Keybukudev shouldn't start things like that02:15
Keybukit's a daemon for getting devices created02:15
Keybuknot a device manager02:15
ArafangionPerhaps, but it already has the functionality.02:15
Keybukno, it doesn't02:16
ArafangionAnd to do what I wanted with eth0, you need the signal from udev anyway, so udev's already a requirement.02:16
ArafangionIt doesn't?02:16
Keybuknot true02:16
Keybukyou want to use HAL02:16
Arafangionrun+="foobar"?02:16
ArafangionHmm.02:16
Keybukhow do you stop foobar?02:16
ArafangionGood question.02:18
=== Jc2k_ is now known as Jc2k
Jc2kooh thats magic12:26
Keybukhmm?12:27
Jc2k [i=scott@conference/ubuntu-developer-summit/x-23c3b871e5ad4e13]12:27
Keybukyeah, it's a Cloak12:27
Keybukwe're all at the same IP address, so FreeNode would k-line us for "cloning" otherwise12:27
Keybukso we tell them that we're at a conference, and they add a magic cloak12:28
Jc2ki c :)12:28
Jc2koh well, back to sync coding.12:28
Jc2kmy BDFL wants to drum up some attention at UDS with pretty Planet Gnome posts..12:29
Jc2kholy cow. seems conduit is on the board of topics...12:32
* Jc2k works harder12:32
=== Keybuk_ is now known as Keybuk

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