/srv/irclogs.ubuntu.com/2009/04/15/#upstart.txt

Zeqadiousdoes "start on stopped job ok" still work?18:58
ZeqadiousI ask because it doesn't seem to here18:58
sadmac2Zeqadious: version?18:58
Zeqadious0.5.118:58
sadmac2Zeqadious: start on stopped job RESULT=ok18:59
Zeqadioussweet18:59
Zeqadiouswhats the other RESULT?18:59
ZeqadiousRESULT=failed?18:59
Keybuksurprisingly18:59
sadmac2Zeqadious: although I'd think that would still work... maybe its changed a bit. There's a way18:59
sadmac2other result was failed I think19:00
Zeqadiousok19:00
Keybukyou can also just shortcut RESULT=failed and just check EXIT_STATUS=* or something19:00
ZeqadiousI removed all the ok's 19:00
Zeqadiousi'll put them back now19:00
Keybukstart on stopped job EXIT_SIGNAL=11 etc.19:00
* sadmac2 tries to imagine the task you want to run on segfault and nowhere else19:00
Keybukstart on stopped EXIT_SIGNAL=1119:01
Keybukexec apport-auto-file $JOB19:01
sadmac2Keybuk: wouldn't you want SIGABRT in there too?19:02
sadmac2also SIGILL, SIGFPE, possibly SIGPIPE19:03
Zeqadioushmmm "start on started udev-daemon RESULT=ok" should work right?19:35
sadmac2it should19:36
sadmac2unless it became OK or something like that.19:36
* sadmac2 doesn't have the code in front of him to check on these things19:36
Zeqadiousi'll try that..19:36
Zeqadiousfsck comes after that, but its not starting for some reason 19:37
sadmac2Zeqadious: you could do a start on started udev-daemon and then in the job definition do an export > /tmp/somefile and then look at somefile and see what its getting set to19:37
Zeqadiousexport what though?19:38
Zeqadiousexport RESULT > /tmp/$job.result ?19:39
Zeqadiousoops19:39
Zeqadious$RESULT19:39
sadmac2Zeqadious: I meant set19:40
sadmac2Zeqadious: no arguments19:41
* sadmac2 begins to realize how many ways unix has to list all the environment variables19:41
Zeqadiousenv19:41
sadmac2set does it too19:41
Zeqadiousreally?19:41
sadmac2export I think does a superset of it19:41
sadmac2yes19:42
Zeqadiousnever tried that19:42
Zeqadiousso it does19:42
Zeqadiousi'll check the result now19:43
Zeqadiouslol, forgot that before fsck the fs is ro19:44
sadmac2hmm. just echo it then. stdout should display it19:45
Zeqadiousyep19:45
Zeqadiouswell it has no result really19:47
sadmac2the environment should be small19:47
Zeqadiousat least there is no variable called RESULT19:47
Zeqadiousit is19:47
ZeqadiousUPSTART_EVENTS=started19:47
Zeqadiousclosest thing i can find19:47
sadmac2odd19:47
Zeqadiousis this the correct way to use the expressions with the start on stanza http://zeqadious.homelinux.net/junkbin/upstart-0.5.1-jobs/sysinit/save-dmesg ?20:06
sadmac2Zeqadious: maybe... what do you think that will do?'20:09
ZeqadiousI think it should start when all conditions inside ( ) are met20:09
Zeqadiousbut i may not need the ( ) 20:10
sadmac2Zeqadious: they aren't conditions. They're events. It will start when all the things inside () /happen/20:10
sadmac2and you need either the \s or the ()s, not both20:10
Zeqadiousoh?20:10
sadmac2oh.20:10
Zeqadiousit won't tell me that there are unknown stanzas when it sees  and started sysinit/cleanup RESULT=ok on a line all by itself?20:11
sadmac2Zeqadious: it assumes the line continues until the closing parenthesis20:12
Zeqadiousthats great20:12
Zeqadiouslooks a lot nicer 20:12
Zeqadiouswell that doesn't seem to work right. that job never starts and afaik those other jobs are all RESULT=ok20:38
sadmac2Zeqadious: are all of them started in the first place?20:42
Zeqadiousyes20:42
sadmac2ok. that's the usual reason these things break...20:42
Zeqadioushardest part i'm finding with these upstart scripts is trying to make them robust enough to deal possible breaks20:45
sadmac2example?20:45
Zeqadiousi'm having issues with fsck script for example.  its silently hangs quite often and I can't seem to track why or when.  or like when some script may fail but won't report a failure and so my save-dmesg script never runs but i can't see why :)20:47
sadmac2first one sounds like an fsck issue20:48
Zeqadiousprobably20:49
Zeqadiousaha21:01
Zeqadiousstatus job should return something right?21:48
sadmacI think so21:51
sadmacyes. the manpage confirms21:51
sadmacinitctl status job21:51
sadmac(there's no symlink for status, I don't think)21:51
Zeqadiousinitctl status job returns nothing too21:52
Zeqadiousit should shouldn't it?21:52
sadmacon 0.5 it might only if the job is running21:52
Zeqadiousreturns nothing if the job is running21:53
Zeqadiousreturns nothing if the job isn't running too21:53
sadmacweeeeird21:53
sadmacwhat does it return with no argument?21:54
ZeqadiousI think the problem this indicates is what is making it so difficult for me to write the scripts.  RESULT=ok for any respawning service doesn't work 21:54
Zeqadiousinitctl status returns all jobs with either running or not running21:54
sadmacok, so that works21:54
sadmacah, so the respawn flag kills the RESULT variable21:55
sadmacbug.21:55
Zeqadiousaha21:55
Zeqadiousalso my scripts are all in directories inside jobs.d like jobs.d/service/hald so the job is service/hald21:55
Zeqadiousbut because of the mangle bug status service/hald returns nothing21:56
Zeqadiousjust found that status service_2fhald works though21:56
sadmacyeah. that's not a new one.21:56
Zeqadiousyeah i saw that one in the bug list21:56
Zeqadiousthis is just the first instance where i had to type the mangled form in to get it to work21:57
keesjrespawn is broken in many ways in 0.522:02
Zeqadiouswell i filed a bug22:08
Zeqadious5pm works out.  thanks for the help all, i'm going home.22:09

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