=== Stevee_ is now known as Stevee | ||
=== Stevee is now known as stevee | ||
jMCg | Hey guys. | 22:18 |
---|---|---|
steffen_b2 | hi | 22:18 |
jMCg | I'm trying to write an init script for trafficserver. The start really works simple -- but the problem is the stop. | 22:21 |
jMCg | upstart 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 |
Keybuk | an init script or an upstart conf file? | 22:22 |
Keybuk | upstart should clean them all up unless they break session | 22:23 |
Keybuk | ps -j ax | 22:23 |
Keybuk | can you paste the relevant bit for those scripts? | 22:23 |
jMCg | http://pastebin.com/BnDmvNZ3 | 22:24 |
Keybuk | no, I mean the relevant part of the ps output | 22:24 |
Keybuk | also that "&" is totally not meant to be there, right? :p | 22:24 |
jMCg | Keybuk: yes, they seeem to do that. | 22:25 |
jMCg | http://pastebin.com/9mGVpe7F | 22:26 |
jMCg | I'm a little confuzzled - I wonder how that looks in Solaris. | 22:26 |
Keybuk | yeah they broke session | 22:27 |
Keybuk | Upstart kills everything in the process group it knows about | 22:27 |
Keybuk | which in this case is 26499 | 22:27 |
jMCg | How does one break sessions? | 22:27 |
Keybuk | so it wouldn't kill anything in 26504 | 22:27 |
Keybuk | setsid() | 22:27 |
jMCg | Why would it make sense to start a new session? | 22:28 |
Keybuk | who knows | 22:28 |
jMCg | oh man, I love comments like this: setsid(); // Important, thanks Vlad. :) | 22:29 |
jMCg | Well, 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 |
Keybuk | so yeah, if killing one doesn't clean up its own mess, meh | 22:30 |
jMCg | Solaris has a different way to track this. They do so via contracts. | 22:35 |
jMCg | That'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 |
Keybuk | there are ways to do that on Linux too | 22:36 |
JanC | jMCg: isn't there a way to tell trafficserver to shut down everything? | 22:38 |
jMCg | JanC: "trafficserver" is a rather fragile script that tracks pids and does that. | 22:39 |
jMCg | JanC: https://svn.apache.org/repos/asf/trafficserver/traffic/trunk/rc/trafficserver.in | 22:39 |
jMCg | Keybuk: such as? | 22:40 |
Keybuk | cgroups | 22:40 |
jMCg | http://www.freebsd.org/cgi/man.cgi?query=ctrun&apropos=0&sektion=0&manpath=SunOS+5.10&format=html | 22:41 |
jMCg | Keybuk: anyway, you think it'll do any harm to remove the above while loop from the second-in-line daemon? | 22:42 |
Keybuk | no idea | 22:42 |
Keybuk | without knowing why Vlad thinks it's important ;) | 22:42 |
jMCg | Nonono. That's in the first daemon. | 22:42 |
jMCg | And 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!