/srv/irclogs.ubuntu.com/2011/04/25/#upstart.txt

=== Stevee_ is now known as Stevee
=== Stevee is now known as stevee
jMCgHey guys.22:18
steffen_b2hi22:18
jMCgI'm trying to write an init script for trafficserver. The start really works simple -- but the problem is the stop.22:21
jMCgupstart doesn't clean up all the children: when I start traffic_cop, that will spawn traffic_manager which will spawn traffic_server - so a stop needs to stop all these.22:22
Keybukan init script or an upstart conf file?22:22
Keybukupstart should clean them all up unless they break session22:23
Keybukps -j ax22:23
Keybukcan you paste the relevant bit for those scripts?22:23
jMCghttp://pastebin.com/BnDmvNZ322:24
Keybukno, I mean the relevant part of the ps output22:24
Keybukalso that "&" is totally not meant to be there, right? :p22:24
jMCgKeybuk: yes, they seeem to do that.22:25
jMCghttp://pastebin.com/9mGVpe7F22:26
jMCgI'm a little confuzzled - I wonder how that looks in Solaris.22:26
Keybukyeah they broke session22:27
KeybukUpstart kills everything in the process group it knows about22:27
Keybukwhich in this case is 2649922:27
jMCgHow does one break sessions?22:27
Keybukso it wouldn't kill anything in 2650422:27
Keybuksetsid()22:27
jMCgWhy would it make sense to start a new session?22:28
Keybukwho knows22:28
jMCgoh man, I love comments like this:   setsid();                     // Important, thanks Vlad. :)22:29
jMCgWell, that's in traffic_cop, and then there's one in traffic_manager, it seems.22:30
jMCg  while ((setsid() == (pid_t) - 1) && (errno == EINTR)) {22:30
Keybukso yeah, if killing one doesn't clean up its own mess, meh22:30
jMCgSolaris has a different way to track this. They do so via contracts.22:35
jMCgThat's why this https://svn.apache.org/repos/asf/trafficserver/traffic/trunk/rc/trafficserver.xml.in works on Solaris, but this: http://pastebin.com/BnDmvNZ3 doesn't work on Linux.22:36
Keybukthere are ways to do that on Linux too22:36
JanCjMCg: isn't there a way to tell trafficserver to shut down everything?22:38
jMCgJanC: "trafficserver" is a rather fragile script that tracks pids and does that.22:39
jMCgJanC: https://svn.apache.org/repos/asf/trafficserver/traffic/trunk/rc/trafficserver.in22:39
jMCgKeybuk: such as?22:40
Keybukcgroups22:40
jMCghttp://www.freebsd.org/cgi/man.cgi?query=ctrun&apropos=0&sektion=0&manpath=SunOS+5.10&format=html22:41
jMCgKeybuk: anyway, you think it'll do any harm to remove the above while loop from the second-in-line daemon?22:42
Keybukno idea22:42
Keybukwithout knowing why Vlad thinks it's important ;)22:42
jMCgNonono. That's in the first daemon.22:42
jMCgAnd I don't even know who that guy is. We don't have a Vlad on the project right now.22:42
jMCg(But we have two Igors, me being one of them)22:43

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