bencc | can I tell upstart not to restart a job? | 09:52 |
---|---|---|
bencc | I have a job that already have a script that monitors it | 09:53 |
steffen_b | dont put respawn in the job ? | 09:53 |
bencc | steffen_b: checking my upstart script | 09:56 |
bencc | steffen_b: respawn should be outside of script, pre-stop... right? | 09:57 |
steffen_b | yep | 09:57 |
bencc | so I'll comment it out. thanks | 09:57 |
bencc | I feel a little guilty when using upstart because it is so much easier than init.d scripts | 09:57 |
steffen_b | yes indeed | 09:58 |
steffen_b | but general perception is | 09:58 |
steffen_b | i dont know how this upstart works | 09:58 |
bencc | that's why debian guys don't want it by default | 09:58 |
steffen_b | at least this is what i get from our users (yavdr) | 09:59 |
steffen_b | well , there is plenty of room for improvement in upstart (or the way ubuntu is using upstart) | 09:59 |
bencc | what would you improve? | 10:00 |
steffen_b | so from debian perspective i can understand it | 10:00 |
steffen_b | check the shutdown handling | 10:00 |
steffen_b | missing 'user' still compared to start-stop-daemon | 10:01 |
steffen_b | missing states | 10:01 |
steffen_b | if you get into the details , you get your hands dirty quickly | 10:02 |
steffen_b | but i cant judge if its ubuntu or upstart | 10:02 |
bencc | ok | 10:03 |
* steffen_b is also just upstart user | 10:03 | |
steffen_b | in a ubuntu based linux distro | 10:03 |
bencc | if my server start script run in the background, how do I use it with upstart? | 10:04 |
bencc | I see the wiki but it mixes old and new releases | 10:05 |
bencc | http://upstart.ubuntu.com/wiki/Stanzas | 10:05 |
bencc | I guess I need to use daemon and than to tell it how to find the pid | 10:05 |
steffen_b | i would say dont use a start script seperate from ubuntu job | 10:05 |
steffen_b | argh | 10:05 |
steffen_b | upstart job i mean | 10:05 |
steffen_b | upstart | 10:05 |
steffen_b | :D | 10:05 |
steffen_b | one second | 10:06 |
steffen_b | http://upstart.at/ | 10:06 |
bencc | maybe I'll remove the part that run it in the background | 10:06 |
steffen_b | http://upstart.ubuntu.com/cookbook/ | 10:06 |
steffen_b | far better then the wiki | 10:07 |
bencc | thanks | 10:07 |
steffen_b | if the server you try to start has a mode to run in foreground | 10:07 |
steffen_b | then use that in the job | 10:07 |
steffen_b | if possible | 10:08 |
steffen_b | easier to get it right then | 10:08 |
steffen_b | having hard time with natty shutdown at the moment | 10:09 |
bencc | ok | 10:09 |
steffen_b | someone here who can provide me some helping hand to track it down ? | 10:10 |
bencc | start myserver and stop myserver works | 15:34 |
bencc | but when I'm trying "restart myserver" I'm getting stop/waiting after ~2 seconds | 15:34 |
bencc | why is that? | 15:35 |
JanC | bencc: are you sure stop & start both work correctly? (restart does exactly that, so there shouldn't be any difference) | 17:26 |
steffen_b | good practice is to use ps -ef | 17:46 |
steffen_b | and compare it to initctl list or status myserver | 17:47 |
steffen_b | if pid is matching main process all is fine | 17:47 |
steffen_b | if you use script section for the main process | 17:47 |
steffen_b | make sure you use exec | 17:48 |
steffen_b | so script and daemon get the same pid | 17:48 |
bencc | JanC: they are working. not sure how I can check if they work correctly | 19:53 |
JanC | just one example of what could go wrong: what if upstart thinks myserver is stopped while it's still shutting down so that when it's restarted too fast some resources that myserver needs are still in use? | 19:59 |
JanC | checking logs might be useful | 20:00 |
bencc | JanC: how can I check the logs? | 20:18 |
bencc | myserver is supposed to halt until it really stops | 20:18 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!