[11:55] <lnykryn> not 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=925821
[12:05] <xnox> lnykryn: we recommend running autoreconf -f -i before starting the configure/build.
[12:07] <lnykryn> xnox: yes, I will do that, but my primary question was more about "official upstream solution"
[12:08] <xnox> lnykryn: 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:09] <xnox> lnykryn: I think we will continue releasing tarballs with generated autofoo, but there is no pressing need to release libnih at the moment.
[12:09] <xnox> s/uploaded/uploader/
[12:10] <lnykryn> xnox: ok
[15:29] <tobin> can 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 arg
[15:29] <tobin> https://gist.github.com/joshuatobin/5eb21e379f377825044b
[15:29] <tobin> The shutdown part is where i keep running into issues. I've tried various methods with stop on starting network-services etc
[15:29] <tobin> but the scrip never seems to get called before networking is shutdown
[15:38] <marrusl> tobin, you also tried "start on deconfiguring-networking" iirc.  I thought that would work since that's supposed to be a hook.
[15:38] <tobin> yeah. I've tried a bunch of different incantations 
[15:38] <jodh> tobin: you mentioned on #ubuntu-server that your problem was due to 'virtual networking devices'?
[15:39] <tobin> jodh: no I just thought maybe that could be a contributing factor
[15:39] <jodh> tobin: so, does the log file I mentioned exist?
[15:39] <tobin> it does not
[15:39] <tobin> Looking to see how to change kernel options now with ec2
[15:39] <tobin> so i can get better logging
[15:42] <jodh> tobin: 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:43] <tobin> yeah. it seems to shutdown crazy fast (and reboot)
[15:43] <tobin> thanks jodh i'll give that a shot as well
[15:46] <marrusl> so I guess tobin's job might be blocking deconfiguring-networking, but deconfiguring-networking being blocked won't block shutdown from continuing?
[16:01] <SpamapS> marrusl: it will
[16:01] <marrusl> yeah, i couldn't figure out why that wasn't working for him then.
[16:02] <SpamapS> tobin: your post-stop must finish for deconfiguring-networking to return to the shutdown scripts
[16:02] <tobin> The post-stop should be running before network is removed right, in theory?
[16:02] <tobin> in my script that is
[16:02] <SpamapS> tobin: I'm not sure if the kill timeout applies to post-stops .. You might want to split this into two tasks
[16:03] <SpamapS> tobin: since these are definitely tasks, not a single job
[16:03] <tobin> okay. Logging isn't working either in post-stop to >> /tmp/upstart.log
[16:03] <tobin> works fine in pre-start
[16:03] <SpamapS> tobin: well just let 'console log' do its thing, it will log to /var/log/upstart/$jobname.log
[16:03] <tobin> SpamapS: okay. gothca
[16:04] <tobin> SpamapS: so if i create a task to stop. would the logic be 'start on started deconfiguring-network'?
[16:04] <SpamapS> tobin: start on deconfinguring-networking
[16:04] <SpamapS> tobin: and the 'task' keyword is critical
[16:05] <tobin> okie
[16:05] <tobin> thanks i'll try that
[16:05] <SpamapS> tobin: 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:06] <tobin> okay 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 seconds
[16:46] <tobin> SpamapS: 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/3205a6b89d6ea01298c0
[17:57] <SpamapS> tobin: this is very wrong
[17:57] <SpamapS> start on (local-filesystems and net-device-up IFACE!=lo)
[17:57] <SpamapS> tobin: I know you see it in other jobs, but its a bug almost always
[17:57] <tobin> okay. that one works. its the start on deconfiguring 
[17:58] <tobin> so either way running exec on shutdown keeps screwing me
[17:58] <SpamapS> tobin: what do you want to do before the network is down?
[17:58] <tobin> run my script, which deletes an A record from route53
[17:58] <tobin> ./ec2_set_hostname.py stop does this
[18:00] <SpamapS> tobin: this should work.. http://paste.ubuntu.com/5655866/
[18:03] <SpamapS> tobin: also for the 'start' use 'start on runlevel [2345]' (though with ec2 instances I'm pretty sure the one you have is fine)
[18:04] <SpamapS> tobin: 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.