/srv/irclogs.ubuntu.com/2009/11/11/#upstart.txt

=== ion_ is now known as ion
=== evand is now known as ev
dmartQuick upstart question in Karmic:16:52
dmartI want to hook in a script to run on shutdown which runs as late as possible, but strictly before filesystems are unmounted.16:52
dmartIs is possible to do that with an upstart job, or do I need a SysV style link from rc[06].d?16:52
sadmacdmart: its likely possible, but its specific to Karmic's setup of upstart, and thus should be asked in an ubuntu-specific channel16:53
dmartOK16:54
dmartOne related question is whether it's possible to put "before event" constraints in upstart jobs.  This would provide a framework for doing the kind of thing I'm talking about, but I couldn't see a way to do it.16:55
Keybuknot before event, no16:55
dmartIs there any plan to add such a thing?  This might make it easier to incorporate things like filesystem unmounting within the upstart framework.16:58
Keybuksort-of16:58
dmartThere might be a straightforward workaround that I'm not thinking of, of course16:59
ionThe sysvinit script will die and become an Upstart job or part of one. Then you can nicely insert your own stuff based on the events emitted by said job.16:59
dmartMy concern was that if you have some random tasks X, Y, Z which need to run on shutdown but before filesystem unmounting, then the unmount job must list them all: start on (stopped X and stopped Y and stopped Z)17:01
Keybukno17:01
KeybukX can be start on starting unmount17:01
dmartAre the jobs serialised... how do you ensure that the unmount job does not really run until X finishes?17:01
Keybukthey're serialised17:04
Keybukjobs can block each other17:04
dmartHmmm, OK.  Do you know if there's a good example somewhere I could look at?17:07
Keybukman 7 starting17:10
dmartKeybuk: Ah, I seee.  Sorry for the newbie questions... I'm still finding my way around the upstart man pages.  Thanks!17:14
dmartJust to check my understanding, if I make a job start on (runlevel [09] and starting rc), will that have the desired effect of a job which runs on shutdown but before the final teardown done by rc?  Is start on starting rc RUNLEVEL=[06] equivalent?17:26
=== robbiew is now known as robbiew_
dmart(I mean [06], not [09])17:27
Keybukactually17:34
Keybukyou can just do17:34
Keybukthe latter17:34
Keybukstart on starting rc RUNLEVEL=[06]17:34
Keybukbecause /etc/init/rc.conf has export RUNLEVEL in it17:34
dmartKeybuk: OK, thanks for confirming.  I think I understand much better now :)17:44
=== robbiew is now known as robbiew_
Berteunhello someone here? :)19:17
JanCno  :P19:17
Berteunhi, i'm running into a problem which might be related to upstart19:47
Berteuni've just installed karmic 9.10 under a xen domu and now the system hangs, just as described here: https://bugs.launchpad.net/ubuntu/+bug/39821419:48
Berteunthe bootlog is here: http://launchpadlibrarian.net/35544120/ubuntu910log-2.txt19:48
=== Md is now known as Guest61563
sadmacBerteun: I'd advise you to CC yourself on that bug then19:49
Berteunif i strip my /etc/init/ and remove quite a few scripts, it ends with init: event_finished: Finished startup event19:49
Berteunyeah okay19:49
Berteunand i suspect mountall is the culprit19:49
sadmacBerteun: you should probably comment on it too19:49
Berteunbut that's only a vague guess19:49
Berteunso i'd like to explore that a bit more19:50
Berteunbut i'm rather new to upstart19:50
Berteunso i'm more or less 'lost' 19:50
sadmacBerteun: if you want general information about upstart internals you're in the right place. As far as solving your issue, though, the launchpad bug is where you should be.19:51
Berteunokay19:51
sadmacThere should probably be some document to link to about how upstart works. None has materialized though...19:52
Berteunyeah, i was looking around for that a bit, i found out about the --debug and --verbose parameters19:53
sadmacBerteun: you should look over all of the manpages that ship with upstart as a starting point. I believe there's one or two that cover the mechanics.19:53
Berteunokay19:53
Berteunis it also possible to start upstart if you boot with init=/bin/bash ?19:54
sadmacBerteun: you'd have to then "exec /sbin/init"19:56
JanC"man 5 init" gives some info about how upstart works20:00
Berteunbut then it starts all its jobs again it thinks it can do (and it hangs) 20:00
JanCor at least enough to understand the upstart config20:01
Berteunit appears to be the mountall executable which causes the problems, is that applicable to this channel too?21:06
sadmacBerteun: technically not, but Keybuk wrote mountall, and afaik this is kind of the defacto place where it gets discussed still21:09
Berteunokay :)21:09
sadmacKeybuk: come forth and be pestered21:09
BerteunI just filed a bug and I'm not demanding it be solved right here and right now, just if some info is missing in the report: https://bugs.launchpad.net/ubuntu/+source/mountall/+bug/46998521:10
sadmacBerteun: you should point out in the original bug that it may be related21:11
BerteunI did that.21:11
sadmaccool21:11
Berteuni've got it21:59
Berteunprobably21:59
Keybukwhat did you got?22:01
Berteunit's an incompatiblity 22:02
Berteunmountall uses pipe2 which is unavailable in 2.6.2622:02
Berteunwhich is wrapped in NIH_ZERO( )22:03
Berteunhence it loops until it is succesful but it won't every be, because it is not there ;)22:03
Keybukoh22:03
Keybukright22:03
Keybukmountall really needs .29 I think22:03
Keybukprobably even .3122:03
Berteunso basically ubuntu 9.10 is incompatible with dom0 lenny22:04
Berteunto make a long story short :)22:05
ionWait... The host’s kernel version matters?22:05
Berteunwell not really, but since ubuntu itself does not provide domU xen kernels the obvious choice is to use the debian lenny kernel.22:06
Berteunwhich most people do22:06
Berteunand then it does not work for an not enterily obvious reason22:06
Berteundebian uses 'xen old style' not the PvOps22:07
JanCah, so I'm right it's a kernel feature mismatch somehow ☺22:07
BerteunYeah, well, it was a bit of a risk of course to try to run an older kernel, but forward porting xen changes is not really my cup of tea ;)22:08
Berteuni'll make a note at the bug page, i'm not the only one it seems22:14
dgtlhi there22:38
=== evand1 is now known as ev
=== superm1` is now known as superm1
Keybukoh23:29
KeybukI'm evil23:29
Keybukion: my --handover/--takeover stuff works :)23:29
Keybukstart plymouthd23:29
Keybukplymouth --show-splash gives you the DRM/FB animation23:29
Keybukwhen, when about to start X23:29
Keybukplymouth --handover23:29
Keybukand at the top of the gdm Init23:29
Keybukplymouth --takeover23:30
ionAwesome. :-)23:30
Keybukthe splash pauses, X inherits the image23:30
Keybukthen begins animating again in X :)23:30
ionWould it be possible to skip --handover and have plymouth automatically pause at the last possible moment when it notices X has taken the framebuffer?23:30
KeybukI don't think it works that way :)23:32
Keybukit isn't using the framebuffer23:32
Keybukit's using the DRM/DRI interface23:32
Keybukso it's possible it'll lock X out23:32
ionAh23:35

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