[16:13] <shutej> hi.  i'm trying to determine whether block-device-added is a method, a hook, or a signal.
[16:13] <shutej> while reading the cookbook, i see: http://upstart.ubuntu.com/cookbook/#keybuk-events-are-like-signals
[16:14] <shutej> ^ this link is 404'ing
[16:15] <shutej> i'm on ec2 and i'm trying to respond to a volume being added or removed by mounting or unmounting.  is this an appropriate job for upstart?
[16:15] <shutej> thus far i have this: http://pastebin.com/Y4pDMh9u
[16:20] <shutej> the block device has been added to the system (i can see it in /dev) but upstart isn't running the job
[16:58] <xnox> shutej: please see $ man 7 upstart-events
[16:58] <xnox> shutej: for the up to date events on your system.
[16:59] <xnox> shutej: i think you want events from the upstart-udev-bridge
[16:59] <xnox> shutej: man 8 upstart-udev-bridge and man 7 udev
[16:59] <shutej> HOLY WOWZERS!  this man page is golden
[17:00] <xnox> shutej:  so yeah, you should be able to see "block-device-added" event, which is generated by upstart-udev-bridge and has all the udev variables set, etc.
[17:01] <shutej> i'm installing the upstart job from cloudinit
[17:01] <shutej> while simultaneously asking ec2 to attach the volume AFTER it can SSH into the instance
[17:01] <shutej> i'm wondering if there's a race condition here
[17:01] <xnox> shutej: try "start on block-device-added" \n "exec env >> /tmp/block-events"
[17:01] <xnox> shutej: depends which ubuntu release you are running.
[17:01] <shutej> 12.04
[17:02] <shutej> .3
[17:02] <shutej> :-)
[17:02] <xnox> shutej: ssh test is not good enough, wait for cloud-init to finish (it happens after one can ssh into the system)
[17:02] <shutej> how would i test for that remotely?
[17:02] <xnox> shutej: and you want "initctl reload-configuration" to pick up the job (potentially, depends on how instances are available)
[17:03] <xnox> shutej: well, try to ssh and check for existance of the magic file (it's something like boot-completed, or finished, or sum such under somewhere /var/*/cloud-init/*)
[17:03] <shutej> so basically i should ssh in from my control script, issue some command that waits for cloud-init to finish
[17:04] <shutej> and then initctl reload-configuration manually (cloudinit doesn't do that)?
[17:04] <shutej> and THEN attach a volume
[17:04] <xnox> yeap.
[17:04] <xnox> (cloudinit does do reload-configuration automatically, in certain releases, from saucy and up)
[17:05] <xnox> so in next lts you will have it.
[17:07] <shutej> thanks for this, it's been about the most helpful 10 minutes of this day.
[17:07] <shutej> off to read.
[18:20] <internetpanda> I am running 6.4 and wanted help with an upstart script to run a search daemon for mediawiki. here is my upstart script which doesn't work: http://pastie.org/8389924
[18:20] <internetpanda> I believe it may have something to do with jave
[18:20] <internetpanda> java* if anyone can please help it'd be greatly appreciated
[18:32] <shutej> move respawn outside script
[18:32] <shutej> for that matter
[18:32] <shutej> remove script and end script
[18:32] <shutej> exec will be sufficient
[18:33] <shutej> stop on ...
[18:33] <shutej> respawn
[18:33] <shutej> exec /usr...