/srv/irclogs.ubuntu.com/2013/03/28/#upstart.txt

=== Md_ is now known as Md
=== PaulePan1er is now known as PaulePanter
lnykrynnot quite sure if this is correct place to ask, but did you use some newer autoconf in last version of libnih? https://bugzilla.redhat.com/show_bug.cgi?id=92582111:55
xnoxlnykryn: we recommend running autoreconf -f -i before starting the configure/build.12:05
lnykrynxnox: yes, I will do that, but my primary question was more about "official upstream solution"12:07
xnoxlnykryn: I'm uploaded libnih in Debian and Ubuntu and I am upstream developer of upstart. We did switch to running autoreconf as part of daily builds & packages in Ubuntu.12:08
xnoxlnykryn: I think we will continue releasing tarballs with generated autofoo, but there is no pressing need to release libnih at the moment.12:09
xnoxs/uploaded/uploader/12:09
lnykrynxnox: ok12:10
tobincan someone here shed some light on an upstart issue I'm having. Im trying to run a script at startup (after networking is up), which seems to work, and then when the host gets a shutdown signal, run the script again, with a different arg15:29
tobinhttps://gist.github.com/joshuatobin/5eb21e379f377825044b15:29
tobinThe shutdown part is where i keep running into issues. I've tried various methods with stop on starting network-services etc15:29
tobinbut the scrip never seems to get called before networking is shutdown15:29
marrusltobin, you also tried "start on deconfiguring-networking" iirc.  I thought that would work since that's supposed to be a hook.15:38
tobinyeah. I've tried a bunch of different incantations 15:38
jodhtobin: you mentioned on #ubuntu-server that your problem was due to 'virtual networking devices'?15:38
tobinjodh: no I just thought maybe that could be a contributing factor15:39
jodhtobin: so, does the log file I mentioned exist?15:39
tobinit does not15:39
tobinLooking to see how to change kernel options now with ec215:39
tobinso i can get better logging15:39
jodhtobin: there is a chance the system is shutting down too fast for the job to run to completion. You could convince yourself of that by adding a sleep before the call to "do_stop" in /etc/init.d/sendsigs.15:42
tobinyeah. it seems to shutdown crazy fast (and reboot)15:43
tobinthanks jodh i'll give that a shot as well15:43
marruslso I guess tobin's job might be blocking deconfiguring-networking, but deconfiguring-networking being blocked won't block shutdown from continuing?15:46
SpamapSmarrusl: it will16:01
marruslyeah, i couldn't figure out why that wasn't working for him then.16:01
SpamapStobin: your post-stop must finish for deconfiguring-networking to return to the shutdown scripts16:02
tobinThe post-stop should be running before network is removed right, in theory?16:02
tobinin my script that is16:02
SpamapStobin: I'm not sure if the kill timeout applies to post-stops .. You might want to split this into two tasks16:02
SpamapStobin: since these are definitely tasks, not a single job16:03
tobinokay. Logging isn't working either in post-stop to >> /tmp/upstart.log16:03
tobinworks fine in pre-start16:03
SpamapStobin: well just let 'console log' do its thing, it will log to /var/log/upstart/$jobname.log16:03
tobinSpamapS: okay. gothca16:03
tobinSpamapS: so if i create a task to stop. would the logic be 'start on started deconfiguring-network'?16:04
SpamapStobin: start on deconfinguring-networking16:04
SpamapStobin: and the 'task' keyword is critical16:04
tobinokie16:05
tobinthanks i'll try that16:05
SpamapStobin: also your script needs to be careful about not taking forever. I think, actually, because of how 'deconfiguring-networking' stops the whole process.. anything that starts on it *MUST* exit in a reasonable time or shutdown will never happen.16:05
tobinokay good to know. 16:06
* SpamapS would love to have an extra keyword for tasks, like 'task seconds 5' to just kill off a task after 5 seconds16:06
tobinSpamapS: any other suggestions other than deconfiguring-network? I still can't seem to get the shutdown bits in the right order. https://gist.github.com/joshuatobin/3205a6b89d6ea01298c016:46
SpamapStobin: this is very wrong17:57
SpamapSstart on (local-filesystems and net-device-up IFACE!=lo)17:57
SpamapStobin: I know you see it in other jobs, but its a bug almost always17:57
tobinokay. that one works. its the start on deconfiguring 17:57
tobinso either way running exec on shutdown keeps screwing me17:58
SpamapStobin: what do you want to do before the network is down?17:58
tobinrun my script, which deletes an A record from route5317:58
tobin./ec2_set_hostname.py stop does this17:58
SpamapStobin: this should work.. http://paste.ubuntu.com/5655866/18:00
SpamapStobin: also for the 'start' use 'start on runlevel [2345]' (though with ec2 instances I'm pretty sure the one you have is fine)18:03
SpamapStobin: just a thought, btw, I would do the manipulation of EC2 from outside the instance. Your scheme is really prone to errors. CloudFormation might be interesting to you.18:04

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