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

age6racerhi all, I want to start firefox at the start of a session and I need it to respawn if it is closed. Will the following jobfile work? http://pastebin.com/meee0801 (I am on Ubuntu Gutsy) 11:40
matteohi15:01
matteoMd: what a surprise!15:02
sadmac_Keybuk: https://bugzilla.redhat.com/show_bug.cgi?id=43737915:04
sadmac_^^thoughts?15:04
Keybuksadmac_: there is no runlevel syntax in 0.315:22
Keybukerr, I mean && syntax15:22
Keybukthe best thing I can think of is to make sure that the serial-console-available events aren't emitted until you want them15:23
sadmac_Keybuk: I figured. What's the next workaround?15:23
sadmac_hmm. that might involve doing nasty nasty things to udev.15:23
Keybukyeah15:23
Keybukyou're encountering a lot of problems with your gettys :)15:23
sadmac_yep15:23
Keybukyou really can't do what you're trying to do with 0.3 :-/15:24
sadmac_I'm thinking about adding a wait-for command to initctl that will just block until a given event is recieved.15:25
sadmac_then we can hack this into pre-start15:26
Keybukyou could do that15:26
Keybukthough that's inherently racy :)15:26
Keybuksince what happens if the event has already been received?15:26
sadmac_true.15:26
sadmac_I also need to add telinit u15:26
Keybukwhat does that one do?15:29
Keybukisn't that just kill -TERM 1 ?15:38
Keybukwhich version of Fedora are you targetting upstart for?15:39
sadmac_Keybuk: upstart will be appearing in F916:40
sadmac_Keybuk: and yes, telinit u does just kill -TERM 1. we already have a 3-liner patch that implements it by doing exactly that.16:40
KeybukF9 is out on Halloween?16:41
KeybukYou do seem to be trying to do more with Upstart than you were doing with sysvinit16:42
Keybukbut I guess that's inherent for you because you have to justify using it instead of sysvinit?16:43
Keybukwhereas in Ubuntu, the justification for using Upstart with the exact same feature set *as* sysvinit is simply testing and debugging16:43
Keybukyou've pretty much hit every single reason that I stopped developing 0.3 and focussed on 0.5 instead16:43
Keybukthey weren't trivial patches, but some major redesigns that needed to happen to the core16:43
sadmac_The sysvinit stuff was kinda brokenish. Upstart features are often easier to do than preserving our own precarious setups.16:44
sadmac_What we're replacing here is stuff that's legacy from red hat linux 6 and earlier. Its hackish.16:45
Keybuk*nods*16:45
sadmac_If all goes well and we get 0.5 for F10, then F10 might nearly qualify as a new distro :)16:47
AlexExtremeI haven't noticed any change at all in the startup process and the way the sysv scripts are managed since RH616:48
* AlexExtreme wonders if he still has his boxed copy of RH616:48
KeybukI think that was about the last version I used16:51
ion_Same here16:51
sadmac_I'll have to mail out install media to everyone16:55
sadmac_:)16:56
* AlexExtreme currently uses an RH-based distro on all his boxes, so doesn't need it ;)16:56
sadmac_AlexExtreme: which one? Or does it vary?16:57
AlexExtremevaries16:57
AlexExtrememain box F8, test box rawhide, my VPS CentOS16:57
AlexExtremeand CentOS on the router16:57
ion_sadmac: Btw, i found another use for wait-for-file: http://gitweb.heh.fi/?p=ion/ubuntu/compcache.git;a=blob;f=debian/compcache-utils.init;hb=ubuntu :-)16:58
sadmac_nice16:58
sadmac_ion_: nice16:59
* sadmac_ goes to class16:59
ion_I learned that /dev/compcache0 might appear just a little while after modprobe has returned.16:59
Keybukheh17:00
Keybukthat would split that job in two though, right?17:00
Keybuk  start on <something>17:01
Keybuk  exec modprobe compcache17:01
Keybuk--17:01
Keybuk  start on modprobe-compcache and file-exists /dev/compcache017:01
ion_Yeah17:01
Keybuk  exec swapon -p 100 /dev/compcache017:01
Keybuk?17:01
jdongAmaranth: and yeah, full upstart boot18:15
Amaranthjdong: sweet18:15
Keybukjdong: hi :)18:15
Amaranthis it faster? :)18:15
jdongKeybuk: hi :)18:15
Keybukback up a bit, it's less insane here18:16
Keybukwhat's the problem and question?18:16
jdongAmaranth: around 15s18:16
Amaranthjdong: damn18:16
ion_Neat18:16
jdongKeybuk: a lot of my upstart rules are hackish "states", as in a pre-start script /etc/init.d/foobar start18:16
jdongKeybuk: google told me to use the "service" keyword for that18:16
jdongKeybuk: my question is, does this in any way prevent parallelized service startups?18:17
jdongAmaranth: right now I'm mostly IO bound -- I'm sure my readahead is wasteful and incomplete at the same time18:17
jdongAmaranth: I'm thinking about disabling or drastically lowering pdflush during bootup18:18
Keybukok18:18
Amaranthdisable the page cache during boot?18:18
Keybukthe difference between "service" and not specifying it is the difference between a service and a task18:18
Keybuk(ie. those with "service" are services, those with tasks are not)18:18
jdongAmaranth: disable the periodic writeback flush18:19
Amaranthah, right18:19
Amaranththat sounds dangerous :P18:19
Keybuka task is expected to complete before it has deemed to have been successful, or to have failed18:19
Keybuka service is only expected to have become running18:19
KeybukAmaranth: ironically maybe less dangerous - since the next boot will be the same as the current one in cases of crash18:19
Keybukthis affects how events and commands block18:20
jdongKeybuk: ah, that makes sense18:20
Keybuk"start task" will block until the task actually finishes18:20
Keybuk(ie. you'll see the pre-start, post-start, main, pre-stop and post-stop scripts in the output)18:20
Keybuk"start service" will only block until the task is running18:20
Amaranthjdong: gimme :)18:20
jdongKeybuk: so with a service, what does the "pre-start" script block?18:20
Keybuk(ie. you'll see the pre-start, post-start and main scripts in the output)18:20
Keybukjdong: life cycle of the job itself is unchanged18:21
Keybukit only affects the things that change the job18:21
Keybukie. if you use the "start" command or "emit" command anywhere18:21
jdongKeybuk: ah, so during bootup can multiple services be "starting up" if they don't depend on each other?18:21
Keybukyeah18:21
jdongKeybuk: sweet18:21
Keybukthough note that if you do18:21
Keybuk  start apache18:21
Keybuk  start dbus18:21
Keybukand apache is a task (no "service" stanza), then dbus won't be started until apache *stops*18:22
jdongKeybuk: ok, that makes sense18:22
Keybukso service is probably far closely to what you want for all of these things18:22
jdongKeybuk: so it's reasonable to wrap an init script into an upstart job using service?18:22
Keybuk(a long standing issue is that service probably should be the default, and task require the stanza)18:22
Keybukvery reasonable18:22
Keybukall init scripts in rc2 are generally services18:23
jdongKeybuk: also, are compound start conditions supposed to work?18:23
Keybukwhereas all init scripts in rcS are generally tasks18:23
Keybukjdong: only in trunk18:23
jdongKeybuk: well that explains a lot! :)18:23
Keybukthe reason that task is the default is that respawning tasks makes no sense18:23
Keybukso it'd have to be an error to give both respawn *and* task18:23
Keybukand the code didn't have the ability to emit that kind of parsing error for a long time ;)18:24
jdongKeybuk: also, what's the shutdown event?18:24
Keybukjdong: whatever you define it as18:24
Keybukupstart has no specific notion of shutdown18:24
Keybuk(though it probably needs one, to disable respawning of services)18:24
jdongKeybuk: oh, so I need to do that :)18:24
jdongAmaranth: http://jdong.mit.edu/~jdong/event.d.tar.gz18:25
jdongAmaranth: warning: I didn't port S20nvidia-kernel as I don't have nvidia stuff18:25
jdongAmaranth: warning 2: usplash must be off. I'll look into that $eventually18:25
Amaranthheh18:25
Amaranthhmm, really fast boot or nvidia and usplash? :P18:25
jdongAmaranth: :) the decision is so difficult18:27
Keybuknvidia-kernel is evil18:27
jdongAmaranth: Note that I also hackishly knocked out rcS/rc2's actually spawning of init.d/rc :)18:27
Keybukit wouldn't be necessary if the nvidia kernel module was ported to udev18:27
Amaranthgood luck there18:28
Keybuknouveau ftw18:29
Amaranthsome year18:29
Amaranthactually probably end of the year for me18:29
Amaranthjdong: interesting, so all this does is wrap the existing init scripts in upstart jobs so you can do an event driven boot18:43
AlexExtremenot fully native?18:44
Amaranthno18:44
Amaranthit just wraps the init scripts so they can be started in parallel and in an event driven way18:45
AlexExtremefair enough18:45
Amaranthi don't see how that would break usplash18:45
AlexExtremeit possibly could18:45
AlexExtremewas it faster than normal?18:46
Amaranthjdong can apparently boot in 15 seconds now?18:46
Amaranthbut i think last time i asked him he was booting in 21 seconds anyway18:47
AlexExtremei got around that when I did a fully native boot quite a while ago18:47
AlexExtremepossibly less, can't quite remember18:47
AlexExtremehaven't got the bootcharts to hand atm18:47
jdongAmaranth: I just got bootchart hooked in and when all activity stops, it's around 22s19:13
jdongAmaranth: but stopwatch time is around 15s to the point I can log in19:14
jdongAmaranth: bootchart has exposed a few bottlenecks that I'll work on :)19:14
Amaranthcool19:14
Amaranthjdong: and what was your times before using upstart?19:15
jdonga bit over 30 I bleieve19:16
jdongAmaranth: I've got a backup of /etc, I will time a "before" afterwards :)19:16
sadmac_Keybuk: can you explain the speed reports we've gotten?19:25
ion_sadmac: What speed reports?19:26
sadmac_ion_: people are claiming fedora boots faster and shuts down MUCH faster with upstart, even though at the moment upstart is doing exactly what sysv did.19:26
ion_I think Ubuntu got those reports as well and it was 100% subjective. :-)19:27
ion_A placebo effect.19:27
AlexExtremeprobably people *think* there's a speed improvement :P19:27
ion_Unless someone has actually measured a difference?19:27
jdongion_: yeah indeed I've seen such reports with Ubuntu19:27
sadmac_ion_: I remember seeing that one person had measured. a couple seconds faster on either side.19:27
jdongI'm going to have some upstart vs upstart-sysv-compat bootcharts ready in 30s19:28
jdongon Ubuntu at least :)19:28
sadmac_Fedora is definitely going to be faster. Only because we'll need to rewrite a bunch of things that are overdue for it.19:30
mbiebl_sadmac_: what are your plans for fedora? do you want to switch to a completely upstartified boot process in fc9+1.19:33
mbiebl_Or will move over gradually19:33
mbiebl_supporting both old sysvinit+upstart jobs19:33
mbiebl_in parallel19:34
sadmac_mbiebl_: all the sysinit and lower level stuff will be upstart. Getting things like apache etc. to use upstart depends on how long it takes me to force the maintainers to do it.19:34
sadmac_so both will be present, though ideally sysvinit won't be used for anything.19:34
ion_Could use a BFDL? :-)19:34
ion_DF19:35
jdonghttp://jdong.mit.edu/~jdong/macbook/bootchart-sysv.png19:35
jdonghttp://jdong.mit.edu/~jdong/macbook/bootchart-upstart.png19:35
jdongupstart vs sysv bootchart19:35
jdongbut that doesn't tell the whole story -- with upstart g19:35
jdongwith upstart GDM is up and waiting to log in almost 10s earlier19:35
mbiebl_sadmac_: will do define a state like "multiuser"19:36
mbiebl_when certain upstart jobs are running you enter this stage and from that on you will run the sysv scripts?19:36
jdongnote the period from 20-25s and how much more fully upstart was able to utilize system resources...19:36
sadmac_ion_: where benevolence toward the project and malevolance toward its contributors are not necessarily mutually exclusive, yes.19:36
sadmac_mbiebl_: hard to say.19:37
sadmac_jdong: looks like 8s improvement19:38
jdongsadmac_: indeed19:38
jdongsadmac_: but considering that initramfs->readahead->udevtrigger is really not improvable by ANY init system.... remove those from the times19:39
mbiebl_sadmac: I'd be interested if you plan to convert the scripts bottom-up or top-down.19:39
jdongsadmac_: and as far as actually starting up of services, it's a much bigger improvement factor.19:39
ion_Would be nice to replace readahead with filesystem block rearranging. :-)19:39
jdonglook at the compactness of the area from about 12s on, when readahead finishes19:39
jdongion_: indeed :)19:40
jdongalso note my slow-arse macbook hard drive19:40
sadmac_mbiebl_: my first desire for the F10 cycle is that rc.sysinit disappear completely.19:40
jdonghad I NOT had a 12MB/s max IO limit...19:40
mbiebl_sadmac when will f9 be released?19:42
sadmac_mbiebl_: Some time in May.19:43
sadmac_mbiebl_: 29 April by current schedule19:45
=== cdahlin is now known as sadmac2
* jdong now plans writing all these init scripts in native upstart....20:44
jdongKeybuk: so with a service where pre-start could take a while, does the service count as "started" after the pre-start script exits?20:50
jdongi.e. if foo "starts on started bar", and bar just sleeps 30 in its pre-start, will upstart wait out that 30s before starting foo?20:51
jdongdoes upstart ignore any types of files in event.d? dotfiles maybe?22:49
Keybukjdong: started yes23:33
* Keybuk sets mode +v23:33
Keybukthat is to say, a service does not count as started until pre-start finishes23:33
Keybuk(actually later, but that's close enough for your kinds of service)23:33
Keybukif you want to know if it has simply "been started", use starting instead23:34
Amaranthjdong: 5 lousy seconds?23:44
Amaranththat's painful23:44
Amaranththen again your boot is tweaked to hell anyway :P23:44
Keybuk5s is pretty good23:47
Keybukas long as the boot doesn't slow down, I'd be happy23:47
ion_Yeah23:47
Keybukactually, right now, I'd be happy if I could stop procrastinating about this damned dbus bindings tool23:49
AmaranthKeybuk: I want me computer to be on before I even think to hit the power button :P23:49
Amaranths/me/my/23:49
KeybukAmaranth: that's when we get reliable suspend and resume23:49
Keybuk  stop on suspend23:50
Keybuk  start on resume23:50
Amarantheh?23:50
Keybuk"wake on esp"23:50
Amaranthhehe23:50
Amaranthcan a service stop on suspend like that though?23:51
ion_I was amazed when the suspend feature on this laptop i recently got (ye olde Compaq with whopping 64 MiB of RAM and a faulty monitor) actually worked on the first try. :-)23:51
Amaranthwould be nicer than editing /etc/default/acpi-support to stop/start stuff23:51
ion_Sure it can.23:51
Keybukwhy not?23:51
Amaranthcool23:51
KeybukHAL/GnomePowerManager would just need to send a dbus message to Upstart before actually initiating the syspend23:52
Amaranthalthough then you'll be blamed for slowing down the suspend/resume even more :P23:52
Keybukgets rid of all the hacky scripts and stuff that do it right now23:52
Amaranthyeah, that's true23:52
Amaranthupstart - removes the nasty hacks made to keep sysvinit working23:53

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