=== releaselogger is now known as apachelogger | ||
djszapi | moin' jhunt ;) | 08:40 |
---|---|---|
djszapi | can we continue the discussion ? | 08:41 |
djszapi | seems upstart is abandoned enough :) | 09:37 |
djszapi | ping jhunt | 13:10 |
benc | how can I wait for a server to cleanly stop in a pre-stop event? | 13:50 |
mbiebl | benc: how do you check if the server is cleanly shut down? | 14:01 |
benc | mbiebl: I have a script /usr/bin/myserver status | 14:03 |
mbiebl | if you have such a check, just add small while loop | 14:03 |
mbiebl | ideally with a timeout | 14:03 |
benc | why a timeout? | 14:04 |
benc | to force stop? | 14:04 |
mbiebl | yeah | 14:04 |
benc | thanks | 14:04 |
mbiebl | say your service dead locks | 14:04 |
mbiebl | you don't want a shutdown to block because of this | 14:04 |
benc | I need to read how to write a while loop and a timeout in a script | 14:04 |
mbiebl | its simple shell | 14:05 |
benc | ok | 14:06 |
mbiebl | benc: add | 14:10 |
mbiebl | pre-stop script | 14:10 |
mbiebl | <your shell script goes here> | 14:10 |
mbiebl | end script | 14:10 |
mbiebl | to your upstart job | 14:10 |
benc | ok | 14:14 |
SpamapS | jhunt: 'morning | 16:37 |
jhunt | SpamapS: evenin' :) | 16:37 |
SpamapS | jhunt: did you have a chance to look at the telinit stuff? | 16:48 |
jhunt | SpamapS: yeah - I'm wondering if we can take a simpler approach though - maybe watch something in /proc/1/* ? | 16:50 |
SpamapS | jhunt: thats what I was wondering too. when one re-execs, does its start time re-set in /proc/#/stat ? | 16:51 |
SpamapS | jhunt: tho again, is /proc still mounted at umountroot time? | 16:51 |
jhunt | I 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 |
jhunt | Certainly, "watch -d -n1 cat /proc/#/stat" works for a script that re-execs itself. | 16:53 |
SpamapS | hmmmm | 16:53 |
jhunt | testing now... | 17:13 |
SpamapS | Good.. 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 again | 17:15 | |
jhunt | dang - my vm wasn't exactly pristine either :( | 17:16 |
* SpamapS waits patiently while his new VM installs. :-P | 17:31 | |
jhunt | SpamapS: just mailed you a script to try. | 17:57 |
SpamapS | jhunt: I'll give it a go shortly. Enjoy the evening. :) | 18:00 |
SpamapS | I do like solving this in script rather than hacking in more C | 18:00 |
SpamapS | given that it is a truly temporary solution | 18:00 |
jhunt | SpamapS: totally agree :) | 18:01 |
SpamapS | sometimes I just get so excited to write new C.. :-D | 18:01 |
lasermike026 | Clint, thanks for the help on the call. | 21:49 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!