[18:16] i'm working on writing an upstart job that will start a service after the network interface is up, but before remote filesystems are mounted. or at least start the service after the network interface is up, then reattempt mounting of remote filesystems. emitting remote-filesystems doesnt seem to have any effect on the _netdev entries in /etc/fstab. any ideas? [18:16] this is on ubuntu maverick [18:21] semiosis: a lot of that stuff is custom to Ubuntu [18:26] i'm sure it is. any pointers? [18:33] I've no idea, sorry [18:33] I haven't been able to keep track of Ubuntu's fork so far [18:33] ok, thanks anyway. i'm sure i'll figure something out :) [19:29] semiosis: so you really need to block the mounting of remote filesystems, right? [19:32] semiosis: sounds like you may need to block some of the 'mounting' events until your service is started. [19:33] SpamapS: not sure what i need, but i figured out that emitting a 'startup' event caused a retry of the mounts. not sure what the other implications of that are though [19:33] semiosis: emitting startup seems a bit bass-ackwards. ;) [19:33] SpamapS: yeah it does! [19:34] SpamapS: but mountall service goes away, so emitting a remote-filesystems (which would trigger the mountall-net job) does nothing at all [19:35] semiosis: so what you want, I think, is start on mounting TYPE=nfs ... [19:35] SpamapS: actually it's glusterfs I'm working with, but it might be similar enough [19:35] semiosis: mounting is a hook point, so mountall blocks on anything that uses that event... [19:36] Ah gluster. Ok.. is mountall "gluster aware" ? [19:36] SpamapS: i dont know. [19:36] seems its not [19:36] so gluster will be treated like a local filesystem unless given the 'nobootwait' flag, I think. [19:36] * SpamapS is still wrapping his head around mountall [19:36] so tiny, but so twisted.. :) [19:37] SpamapS: basically, gluster service starts up & exports directories over the network (which could be eth0 or lo) then I have a client mount of the glusterfs volume in my fstab, which never gets mounted during bootup, unless i put 'mount -a' or similar in rc.local [19:38] SpamapS: hmm that woudl explain why _netdev didnt seem to make any difference. in fact, nobootwait didnt seem to make any difference either [19:38] semiosis: right, you might just try adding _netdev=eth0 to the options [19:39] err [19:39] just _netdev [19:39] semiosis: no _netdev should make it a "remote" filesystem [19:40] semiosis: so you're saying in order for gluster to be able to mount a remote fs, it needs a service, right? [19:40] SpamapS: not at all [19:40] Ok.. then thats very odd that _netdev didn't work [19:41] SpamapS: this host is a server and a client, in order for it to be a client of its own served volume, the service needs to be up [19:41] semiosis: AHHH [19:41] SpamapS: so the server name here is localhost [19:41] yeah so you *do* need it to start on mounting TYPE=glusterfs [19:42] SpamapS: hmm i was hoping this could be solved by adding an upstart job to my custom glusterfs package, but are you saying it requires changes to mountall? [19:42] semiosis: you might just try a task that is 'start on mounting TYPE=glusterfs' that starts the service (exec /etc/init.d/glusterfs start) [19:42] SpamapS: ok then where does the mounting TYPE=glusterfs event get emitted? [19:43] semiosis: by mountall, whenever it tries to mount glusterfs volumes [19:43] SpamapS: ooh neat [19:43] and, importantly, it waits for that task to finish [19:44] semiosis: you could also, of course, convert glusterfs to an upstart job completely.. which would improve boot speed and be super cool. ;) [19:45] SpamapS: thats what i'd like to do [19:45] SpamapS: and it shouldnt be too hard, the service is super easy to manage (it really manages itself, just needs a kick) i just need to figure out these events [19:46] semiosis: the one tricky thing about mounting TYPE=glusterfs is you're going to see that event multiple times and sometimes the network won't be up... but don't be tempted to do 'and net-device-up' ;) [19:47] SpamapS: actually i was thinking 'or net-device-up' [19:47] SpamapS: but first things first [19:50] see if you do 'or net-device-up' you may not block mounting TYPE=glusterfs [19:51] unless you add instance $UPSTART_EVENTS [19:51] and even then I'm not sure if that will work [19:55] SpamapS: hmm no luck yet. i've got a trivial upstart job to start glusterd, it has 'start on mounting TYPE=glusterfs' and 'exec /usr/sbin/glusterd -N -p /var/run/glusterd.pid' which will execute the daemon and have it stay in foreground (-N = no fork) [19:55] SpamapS: now this job does get run at boot, the service is up when I login, but the mount from fstab is still not mounted [19:56] semiosis: one thing that may cause that to fail is that it will be considered "started" as soon as it execs glusterd .. [19:56] semiosis: but it may not be ready to service things yet. [19:56] SpamapS: i also tried adding _netdev to the fstab but no effect [19:56] semiosis: weird. I wonder if your glusterfs partitions are even being attempted on 'net-device-up' [19:58] SpamapS: well doing 'initctl emit -n startup' does mount the volume from fstab [19:59] semiosis: but.. that seems a bit .. silly. [19:59] semiosis: maybe just 'start mountall' [19:59] but even that is counter intuitive [19:59] SpamapS: i know but as a test it suggests to me that the mount in fstab is being evaluated due to upstart events [20:00] semiosis: boot with '--verbose' and see if the mounting event is even being emitted [20:00] SpamapS: the service does start up, and mounting is the only event in its 'start on' line [20:00] SpamapS: where do I add --verbose? grub boot line? [20:02] semiosis: yeah [20:02] semiosis: ahh ok so the service does start ... then that makes me think the gluster mount just fails [20:04] SpamapS: checking client logs... looks like it's trying the mount before the service is started, which has been the issue all along [20:10] semiosis: right, so you need to add a post-start to your job that spins until gluster is ready [20:11] SpamapS: interesting, sounds reasonable, i'll work on that. === Md_ is now known as Md [20:20] SpamapS: you rock!!! adding a post-start script of just 'sleep 5' did the trick! now i know what's needed I can get it down to the minimum necessary. thanks for your help! :-D [20:22] SpamapS: also as a side note, thanks for the quick tutorial on mountall & the events it generates, i've found a whole new area of man pages to study based on that quick tip. [20:22] semiosis: in natty, 'man upstart-events' is really good [20:23] SpamapS: nice, i'll check that out on the web, i dont have a natty install set up yet [20:23] semiosis: manpages.ubuntu.com has it [20:23] SpamapS: i'm there [20:23] "we're there dude" [20:28] oh wow. I'm absolutely flabbergasted. Since when does that exist? [20:29] O_o [20:30] How do you fuck up man pages? [20:39] i dont know, how? [20:40] * semiosis likes a good joke [20:40] semiosis: compare manpages.ubuntu.com with http://www.freebsd.org/cgi/man.cgi [20:40] It's actually a bad joke. [20:41] Also try finding that site from: http://www.ubuntu.com/ or https://help.ubuntu.com/ (th eofficial documentation) [20:56] Keybuk: what's it take to port upstart to FreeBSD :) [20:57] jMCg: a FreeBSD developer being interested enough to do it [20:59] jMCg: the manpages site is linked from https://help.ubuntu.com/community but I agree it should probably be linked from the frontpage... [21:02] JanC: or at least from help.ubuntu.com [21:02] yes, that's what I meant, the frontpage of the help site [21:05] jMCg: the trouble is, of course, that FreeBSD developers don't need Upstart [21:05] they still haven't moved off the one big shell script approach [21:06] (at least, don't think they need :oP) [23:31] hi. can i use upstart without dbus? [23:31] The daemon? Sure. [23:32] it seems, that the tools only use dbus to communicate with the daemon. [23:32] shutdown, telinit, ... [23:32] The daemon? Only optionally if it happens to be there. [23:33] sysv_change_runlevel requires dbus. [23:33] it requires the dbus protocol, not the dbus daemon [23:33] there is a miniature dbus daemon built into upstart that it connects to [23:34] ok :-) [23:34] so the upstart daemon will "emulate" the dbus daemon? [23:35] not so much, but close enough for government work [23:35] ok [23:35] thank you for your help.