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