/srv/irclogs.ubuntu.com/2012/06/08/#upstart.txt

xakawhy "stop" would hang?11:56
xakastart works, tracking PID is corret, when i do stop the process finishes succesfully, but the command itself hangs 11:56
jodhxaka: what does "initctl status <job>" show? maybe you 'post-stop' is still running?13:14
xakai don't have post-stop. after some time i stopped it by Ctrl+C. status is "stop/killed, pid ...". then i tried to start it again and even start hanged13:16
jodhxaka: can you show me the conf file?13:18
xakajodh: http://pastebin.com/nMV1s7YD13:21
jodhxaka: firstly, you need to be careful with those pre-start commands since if any fail, the job will not run. See http://upstart.ubuntu.com/cookbook/#develop-scripts-using-bin-sh13:23
xakajodh: i understand, but that pre-start is the only solution for my case that i was talking about yesterday here13:24
jodhxaka: are you sure that Upstart is tracking the pid correctly? Does "nms" definately fork only once?13:24
xakait starts with no issues, after that "status" shows correct PID13:25
xakait even stops the process, but "stop" command doesn't finish13:25
xakajodh: i have the simple script that you can use to reproduce the situation, let me paste it13:26
xakajodh: http://pastebin.com/jityDGxg ( don't ask why it's been written in this way :) )13:28
xakajodh: btw, are you going to add support for dependencies like SMF has? i was talking/complaing about it yesterday. i want to say that B depends on A so when B is started and A isn't running yet, A has to be started first.13:32
xakathat is the only reason i have that pre-start hook - i don't want (and i haven't) to modify ntp/mongodb conf files, but i still want to be sure that the services are running 13:33
jodhxaka: the problem is that your perl script is attempting to "manage" the service by killing the child. However, you've told Upstart that the child PID *is* the service so Upstart is tracking the forked child process. Either remove the "expect fork" or stop the perl script from killing the child - Upstart will do that for you as it kills the process group.13:43
xakajodh: the wrapper doesn't kill the child (those INT/TERM handles only for developers). the simple is chain is: fork->exec->waitpid13:52
xakabtw, does the upstart kill the process group of forked child or the parent?13:53
jodhxaka: please see my comments above.13:53
kevmoHow can you tell upstart to get the pid from a pid file on the stop command21:25

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