/srv/irclogs.ubuntu.com/2013/10/09/#upstart.txt

=== PaulePan1er is now known as PaulePanter
=== Md_ is now known as Md
shutejhi.  i'm trying to determine whether block-device-added is a method, a hook, or a signal.16:13
shutejwhile reading the cookbook, i see: http://upstart.ubuntu.com/cookbook/#keybuk-events-are-like-signals16:13
shutej^ this link is 404'ing16:14
shuteji'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
shutejthus far i have this: http://pastebin.com/Y4pDMh9u16:15
shutejthe block device has been added to the system (i can see it in /dev) but upstart isn't running the job16:20
xnoxshutej: please see $ man 7 upstart-events16:58
xnoxshutej: for the up to date events on your system.16:58
xnoxshutej: i think you want events from the upstart-udev-bridge16:59
xnoxshutej: man 8 upstart-udev-bridge and man 7 udev16:59
shutejHOLY WOWZERS!  this man page is golden16:59
xnoxshutej:  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:00
shuteji'm installing the upstart job from cloudinit17:01
shutejwhile simultaneously asking ec2 to attach the volume AFTER it can SSH into the instance17:01
shuteji'm wondering if there's a race condition here17:01
xnoxshutej: try "start on block-device-added" \n "exec env >> /tmp/block-events"17:01
xnoxshutej: depends which ubuntu release you are running.17:01
shutej12.0417:01
shutej.317:02
shutej:-)17:02
xnoxshutej: ssh test is not good enough, wait for cloud-init to finish (it happens after one can ssh into the system)17:02
shutejhow would i test for that remotely?17:02
xnoxshutej: and you want "initctl reload-configuration" to pick up the job (potentially, depends on how instances are available)17:02
xnoxshutej: 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
shutejso basically i should ssh in from my control script, issue some command that waits for cloud-init to finish17:03
shutejand then initctl reload-configuration manually (cloudinit doesn't do that)?17:04
shutejand THEN attach a volume17:04
xnoxyeap.17:04
xnox(cloudinit does do reload-configuration automatically, in certain releases, from saucy and up)17:04
xnoxso in next lts you will have it.17:05
shutejthanks for this, it's been about the most helpful 10 minutes of this day.17:07
shutejoff to read.17:07
internetpandaI 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/838992418:20
internetpandaI believe it may have something to do with jave18:20
internetpandajava* if anyone can please help it'd be greatly appreciated18:20
shutejmove respawn outside script18:32
shutejfor that matter18:32
shutejremove script and end script18:32
shutejexec will be sufficient18:32
shutejstop on ...18:33
shutejrespawn18:33
shutejexec /usr...18:33

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