/srv/irclogs.ubuntu.com/2011/08/11/#upstart.txt

pmjdebruijnI'm still having an issue where my shutdown is blocking08:16
pmjdebruijnlast thing that upstart reports is that hwclock-save was stopped08:16
pmjdebruijnI fixed my RTC though08:21
pmjdebruijnok11:27
pmjdebruijnso fiddling with the rc job is a bad idea11:36
pmjdebruijnit seems having something -start on stopped nethostname11:36
pmjdebruijn+start on stopped nethostname and starting rc11:36
pmjdebruijnsorry11:36
pmjdebruijnit seems that the following is a bad idea:11:37
pmjdebruijn-start on stopped nethostname11:37
pmjdebruijn+start on stopped nethostname and starting rc11:37
pmjdebruijnand it doesn't even do what I want it seems11:37
pmjdebruijnsince starting rc doesn't garantee this job has finished before rc continues11:37
pmjdebruijnat least that's how it seems11:37
pmjdebruijnthe big problem is, that's critical for me to have rc execute _after_ another job has finished running11:38
pmjdebruijnthis is only relevant for bootup11:38
pmjdebruijnfurther runlevel changes do not need to be affected11:38
pmjdebruijnI guess I'll have to upstartify all important rc services11:47
pmjdebruijnto make this work11:47
pmjdebruijn:(11:48
sleonhi14:46
sleonis there a trick how to get current display and username of the user who is logged in other gdm?14:47
=== balgarath_ is now known as balgarath
sveinseI'd like to start a small script when halt, reboot and shutdown are called. I've added a conf with start on runlevel [06] and the script embedded in a script block. However this often does not work, i.e. the script isn't run as it should. This is on Natty16:38
sveinseBecause it could seems like there is a race between the rc.conf and my conf script. And if rc.conf is run prior to mine (which ultimately terminates the machine), then I understand why is doesn't run16:39
sveinseIs there a way to ensure ordered execution? Change rc.conf to start when my custom script is done?16:40
pmjdebruijnI'd not change rc conf16:45
pmjdebruijnthat bit me recently :)16:45
sveinseSince init.d provides ordered script execution, while init doesn't, init doesn't seem to be a complete replacement of init.d yet.17:00
pmjdebruijnheh17:17
pmjdebruijnyou really are missing the point17:17
pmjdebruijn:)17:17
pmjdebruijnthe whole _point_ of upstart is not to be ordered, and allow parallization17:17
pmjdebruijnalthough I do agree it does complicate some things17:18
pmjdebruijnthe fact that your job isn't always run is probably explainable17:18
pmjdebruijnsveinse: btw you can still use SysV init style scripts17:18
pmjdebruijnsveinse: you might want to pastebin your original upstart script here, so other can take a look, and idle a bit more17:19
sleonstopped manpage states that there is RESULT parameter which is either ok or failed17:37
sleonin which circumstances is it set ? because i do not see having it in the environment of a job which listens for stopped of other job17:38
sleonaaa i got it17:50
sleonthey are only set in start on17:50
marruslpmjdebruijn, yes.  however, there are some things that just need to run in order, there's no getting around it.  and there are ways to make that work in upstart.19:58
marruslthat guy didn't have to modify rc.conf necissarily.  he could have made his own job start on starting rc.19:59
pmjdebruijnhuh?20:00
* pmjdebruijn recommended he _not_ change rc.conf20:00
marruslpmjdebruijn, yes.  agreed. 20:00
marruslpmjdebruijn, so if he wants his custom.conf to always run before rc.conf, he can set his custom.conf to have "start on starting rc".20:01
marruslmaybe I missed something though.  ;)20:01
marruslmight not work depending on what he's doing with it.  and s/he's gone anyway.  so no matter.20:03
pmjdebruijnmarrusl: that doesn't guarantee custom.conf has finished before rc.conf has finished20:19
pmjdebruijnalso start on starting rc caused me problems when rebooting20:19
marruslpmjdebruijn, no it actually should block until custom emits "started" or in his case, a task which I think would go straight to "stopped" then unblock rc20:20
pmjdebruijneh20:20
pmjdebruijnit doesn't work like that20:20
pmjdebruijnI tried it20:20
pmjdebruijnunless something else was interfering20:21
marruslin general if job a says "start on starting b", b will not do anything until a has emitted "started" or "stopped"20:21
pmjdebruijngave me lots of grief in any case20:21
marruslhowever rc is an odd job20:21
pmjdebruijnright20:21
pmjdebruijnlike I said, in practise it didn't work for me20:21
pmjdebruijndidn't behave as expected20:22
pmjdebruijnand I had lockups when rebooting20:22
pmjdebruijn  digitalWrite(ledPin, HIGH);   // set the LED on20:22
pmjdebruijnsorry20:22
pmjdebruijnhttp://blog.pcode.nl/2011/08/11/upstart-dont-mess-with-the-rc-job/20:22
marrusli'll buy it.  I just would say in general that it's not all about parallelization20:22
marruslthere are plenty of dependencies in upstart as well.  they're just not expressed that way.  you can order jobs.20:23
pmjdebruijnyeah20:23
pmjdebruijnrc just seems dangerous to mess with20:23
marruslthough it can be tough if you want job a to start before job b OR job c20:23
marruslthat I'll take on faith ;)20:23
pmjdebruijn:)20:23
pmjdebruijnI'm converting my remaining SysV scripts to upstart jobs20:24
pmjdebruijnthen my problem just disppears20:24
pmjdebruijnmost things are easy to upstartify20:24
marruslIt helps.  I've only tried a couple.20:24
marruslseems like if you can run them in the foreground, you're set20:24
pmjdebruijnI had to patch nagios-nrpe though to allow it to run in the foreground20:24
pmjdebruijnstill have to test that tomorrow20:24
marruslright20:24
marruslinteresting20:24
pmjdebruijnhttps://launchpad.net/~unnet-pkg-master/+archive/icinga-release20:25
pmjdebruijnso it's untested now20:25
pmjdebruijnI hope to confirm tomorrow20:25
marrusloh icinga.  interesting.20:25
marruslhow is that project going?20:25
pmjdebruijnwell20:25
pmjdebruijnall the icinga extra's are not very nice20:25
pmjdebruijnbut the CORE Icinga is great20:26
pmjdebruijnit's Nagios, but it seems to be better maintained20:26
pmjdebruijnthe pimpy ajax frontend sucks, since it's impossible to package well at the moment20:26
pmjdebruijnI guess that'll just take some time20:26
pmjdebruijnbut i'll take CORE icinga over nagios any time now20:26
marrusli'm just wondering because the mindshare/install-base is still with nagios.  so some would be afraid of icinga having/maintaining momentum20:27
marruslnot close to that myself, just curious.20:27
pmjdebruijnmy faith is with Icinga20:28
pmjdebruijnbut I agree the war isn't over yet :)20:28
pmjdebruijnthe big point is that core Icinga already is mature, since it's just a patched Nagios (3?)20:28
pmjdebruijnmarrusl: btw we have more handy backports :)20:30
marruslpmjdebruijn, when I get the chance, I will give it a go, because anything has got to be more pleasant than configuring nagios.20:31
pmjdebruijnwell20:31
pmjdebruijnin that sense Icinga is the same20:31
pmjdebruijnconfigs haven't changed much20:31
marruslhaha.  rats.20:31
pmjdebruijnalthough the default layout is a bit nicer20:31
pmjdebruijnbut that's marginal20:31
pmjdebruijnmarrusl: to be honest I don't mind it much20:32
pmjdebruijnI haven't come across a different monitor tools that works as well as Nagios/Icinga20:32
marrusland i've heard of a lot of people that use other tools to bend it into shape and find it pretty easy.20:32
pmjdebruijneven if it's harder to config20:32
* pmjdebruijn does it by hand20:32
pmjdebruijnlots of automated tools create messy configs20:32
* marrusl applauds. :)20:32
pmjdebruijnso if you have to go in by hand for something it's that much harder20:32
pmjdebruijnin the end a good investment to config nagios by hand20:34
pmjdebruijnforces you to really think about things20:34
pmjdebruijn:)20:34

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