[12:07] hi guys, is there an authoritative guide for job file syntax somewhere? most of the stuuff on the upstart wiki seems more "proposal-ish" [12:08] specifically wrt the version in hardy [12:08] man 5 init [12:08] oh, in hardy, no [12:09] yeah i've already heard through the grapevine that it might have changed since then [12:10] yes, and it will change again [12:10] should i just forget about trying then, and use something like rc.local? [12:10] * seanius would prefer inittab, but that's gone now it seems [12:12] or, is inittab supported in the -compat-sysv package but just not shipped by default? [12:20] ...it seems not (beyond default runlevel at least) [12:21] it's not supported, no [12:21] sorry for flooding teh channel btw :) [12:22] i have a service i'd like to run with supervision (i.e. "respawn") which should start after ssh/networking/postgres is brought up [12:24] is this possible to do in hardy's 0.3.9 upstart? [12:29] Probably best to start it when rc2 has finished. But i don’t remember the precise syntax for 0.3. [12:30] Something like [12:30] start on EVENTSPEC [12:30] service [12:30] respawn [12:30] exec yourservice [12:31] okay, i htink i can take that and what's sitting in event.d to try something, thanks! [12:31] where EVENTSPEC is the correct string to match whatever happens when rc2 has finished. === Keybuk_ is now known as Keybuk [12:40] ion: okay so that would be something like "start on started rc2"? [12:41] ...which is output from initctl events when i run "telinit 2" [12:41] I take it there’s a /etc/event.d/rc2? [12:42] yeah [12:42] Do you get a ‘stopped rc2’ when rc2 finishes? [12:43] i think i get that if i switch to runlevel 3 [12:43] You’ll probably want ‘start on stopped rc2’ or something like that. [12:43] Hmh, not that, then... [12:44] yeah this is what i get http://paste.debian.net/48855/ [12:44] this is switching from 2->3 and then back from 3->2 [12:45] oh, it looks like it is saying "stopped rc2" last then isn't it... [12:45] Did stopped rc2 happen before or just after switching to a new runlevel? [12:46] it looks like it's the last thing that happens when switching *to* that runlevel [12:46] so then i'd want "start on stopped rc2" [12:46] Alright, that should work. [12:47] and if i want to stop it on reboot/shutdown would that be "stop on runlevel [06]" ? [12:49] Look at what the tty* jobs do, that should work. [12:49] ah, just multiple stop stanzas [12:50] The [016]-style pattern might only be supported in a newer version of Upstart. [12:50] there was a runlevel [!2] in the rc2 file at least [12:51] Ok, it probably would work then. [12:52] allright, looks like we're up and running [12:52] thanks for the help [13:23] ion: I think I always used fnmatch() for that === sadmac2_ is now known as sadmac [18:22] Hi! I updated karmic yesterday and now I can't boot with my self-compiled kernel -- mountall complains about /proc/filesystems, I think because I'm not using an initrd. [18:22] I'm wondering if this is a permanent change, and if there's any workaround to boot without initrd? [19:39] Keybuk: what are operations that one does on a device node that don't start with opening it and acting on the resulting descriptor? [20:08] akk: I've been looking at it a bit & I think a solution/workaround would be to edit the existing "mountall.conf" upstart script to add a 'pre-start' script that makes sure /proc (and maybe other requirements?) exist before mountall runs [20:08] but Keybuk or somebody else probably knows more about what the "right" solution would be ;) [20:11] JanC: Thanks for looking! Wouldn't I have to delay running mountall at all until it had mounted root readonly? [20:12] Though d found that mountall 0.1.8 worked (two revs back). [20:16] akk: whatever requirements mountall has should go in the pre-start script (or in a separate upstart job on which mountall depends?) [21:51] can i have multiple "start on " lines in an upstart config? or do they need to be on one line? [22:08] Anyone have any tricks for debugging early boot process with upstart? [22:10] sadmac: none that I can think of [22:14] Keybuk: well the mount command takes the path, but that can be gotten around... [22:14] Keybuk: a shocking proposal: axe device nodes. replace with connect(AF_DEVICE...) [22:14] sadmac_: then you can't alias them ;) [22:14] the network people (who have this) are trying to go the other way [22:15] akk: this is generally a channel for Upstream issues, try #ubuntu [22:15] akk: though because I'm nice, see bug 447947 [22:15] Keybuk: sure you can. DNS can alias IP addresses, why can't some similar service alias major/minor pairs? [22:15] sadmac_: how so? [22:16] chergert: no. [22:16] mugwump: --debug on the kernel command-line is always fun [22:16] but you need quick reactions on the old scroll lock key ;) [22:16] (and a scroll lock key, bloody netbooks!) [22:16] heh [22:16] ctrl+s does the same thing on the console, no? [22:16] no... [22:16] :( [22:17] Keybuk: Thanks! [22:17] Keybuk: basically you have a gethostbyname equivalent like getdevicebyname. you pass it a name, and it communicates to some service (probably a very re-invented udev) and returns a major/minor in a struct socaddr_device [22:17] well, that's useful, thanks. I actually ended up reinstalling because I couldn't figure out why the system wouldn't boot... [22:18] sadmac_: device filesystems are a more popular way of doing that [22:18] Keybuk: but they suck. [22:18] it would be nice to have details like that on the upstart man page [22:18] sadmac_: the only API I can think of that sucks more is, err, DNS [22:19] mugwump: it's a good point that init(8) doesn't document the options, could you file a bug about that? [22:19] Keybuk: if you tried out a web browser, and when you launched it instead of a website it gave you a blank window and the glade interface designer and said 'draw yourself a UI', and it did this every time you started it would you keep it? [22:19] to which bugtracker? [22:19] launchpad? [22:19] Keybuk: by that logic, where the fuck does the kernel get off giving userspace a some-assembly-required interface to hardware? [22:20] mugwump: http://launchpad.net/upstart/+reportbuf [22:20] mugwump: http://launchpad.net/upstart/+reportbug [22:20] * mugwump reports a buf [22:20] it might be +filebug ;) [22:20] I'll find it :) [22:26] Keybuk: https://bugs.launchpad.net/upstart/+bug/449883 [22:28] though it would be nice to have an option which starts a shell or something and requires you to prod it to make the next event fire [22:28] quite often in that sort of situation I'll be doing diag checks between init scripts [22:29] yes, we should have that [22:29] in fact, my thought is that init will look at the kernel command-line options [22:29] and if any job exists with the names given, it will start that [22:29] sure, why not [22:29] so you could have /etc/init/emergency.conf containing the code for a console root shell [22:29] the decision to run as real init, it makes that based on the pid, right? [22:29] then if you stuck emergency on the kernel command-line then it would give you that [22:30] that sounds pretty clean [22:30] that'd same code would make implementing things like "single" really easy too [22:30] (and most importantly let the mobile phone developers *not* have that ) [22:30] do you use lxc for testing already? [22:31] It should let you start a process that thinks it's pid 1 [22:31] and can't see any other processs [22:31] no, the test suite is pretty comprehensive though [22:32] ah, good to know [22:32] presumably you mock that somehow in the test suite [22:32] actually, very little requires that init be pid 1 [22:32] the only reason, in fact, is because sysv let people call init to change the runlevel ;) [22:32] if you build upstart a certain way, you can cheerfully run it as any user [22:33] and use that one for testing [22:33] * Keybuk does that a lot [22:33] reparenting I would have thought was pretty important [22:33] or I guess not, maybe you only care about immediate children [22:33] not really, we don't get told about it [22:33] do you get SIGCHLDs from them? [22:34] eventually yes [22:34] but there's no use for that, because we don't know what process it was ;) [22:34] pid 4131 died ... that's nice [22:34] heh [22:34] kernel helpfully reaps info from /proc first [22:34] not that it would be reliable anyway [22:35] or portable... any bsd users? :) [22:35] I'm utterly uninterested in portability [22:35] Upstart is a Linux program [22:39] fair enough, you won't find me complaining or submitting portability patches [22:39] I've suggested to the Debian/kFreeBSD nutters that they branch the code and rewrite it to be a BSD program ;) [22:45] ugh. I keep getting to places where I want to commit, but I don't want to because it would mean committing or digging out the piles of printfs that I want to still be in place for the next phase of implementation. === sadmac_ is now known as sadmac2 [23:13] keybuk: Btw, there’s the mnt->device "none" change sitting in my branch. Not very important, but anyway. :-) [23:36] keybuk: The latest commit in the mountall repo breaks the code. I’m not quite sure what it’s attempting to do. [23:37] Ah, now i get it. Yeah, just a missing || [23:39] keybuk: Fix in my branch. [23:43] oh, the fix is already in mine [23:43] Alright [23:44] uncommited and pushed; my branch still contains the (not very important) mnt->device "none" change. [23:47] the whuh? [23:47] oh that, I'll merge that in