/srv/irclogs.ubuntu.com/2011/01/20/#upstart.txt

=== releaselogger is now known as apachelogger
djszapimoin' jhunt ;)08:40
djszapican we continue the discussion ?08:41
djszapiseems upstart is abandoned enough :)09:37
djszapiping jhunt13:10
benchow can I wait for a server to cleanly stop in a pre-stop event?13:50
mbieblbenc: how do you check if the server is cleanly shut down?14:01
bencmbiebl: I have a script /usr/bin/myserver status14:03
mbieblif you have such a check, just add  small while loop14:03
mbieblideally with a timeout14:03
bencwhy a timeout?14:04
bencto force stop?14:04
mbieblyeah14:04
bencthanks14:04
mbieblsay your service dead locks14:04
mbieblyou don't want a shutdown to block because of this14:04
bencI need to read how to write a while loop and a timeout in a script14:04
mbieblits simple shell 14:05
bencok14:06
mbieblbenc: add  14:10
mbieblpre-stop script14:10
mbiebl<your shell script goes here>14:10
mbieblend script14:10
mbieblto your upstart job14:10
bencok14:14
SpamapSjhunt: 'morning16:37
jhuntSpamapS: evenin' :)16:37
SpamapSjhunt: did you have a chance to look at the telinit stuff?16:48
jhuntSpamapS: yeah - I'm wondering if we can take a simpler approach though - maybe watch something in /proc/1/* ?16:50
SpamapSjhunt: thats what I was wondering too. when one re-execs, does its start time re-set in /proc/#/stat ?16:51
SpamapSjhunt: tho again, is /proc still mounted at umountroot time?16:51
jhuntI think we could watch /proc/1/stat. I too was wondering about start time, but ps doesn't appear to report this as I'd expect.16:52
jhuntCertainly, "watch -d -n1 cat /proc/#/stat" works for a script that re-execs itself.16:53
SpamapShmmmm16:53
jhunttesting now...17:13
SpamapSGood.. my init without the semaphore on first exec just stalls after init: Handling startup event :(17:14
* SpamapS curses himself for forgetting to clone his pristine lucid VM again17:15
jhuntdang - my vm wasn't exactly pristine either :(17:16
* SpamapS waits patiently while his new VM installs. :-P17:31
jhuntSpamapS: just mailed you a script to try.17:57
SpamapSjhunt: I'll give it a go shortly. Enjoy the evening. :)18:00
SpamapSI do like solving this in script rather than hacking in more C18:00
SpamapSgiven that it is a truly temporary solution18:00
jhuntSpamapS: totally agree :)18:01
SpamapSsometimes I just get so excited to write new C.. :-D18:01
lasermike026Clint, thanks for the help on the call.21:49

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