<div class="gmail_quote">On Mon, May 2, 2011 at 10:54 AM, Marc - A. Dahlhaus <span dir="ltr"><<a href="mailto:mad@wol.de">mad@wol.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Am 02.05.2011 19:20, schrieb Scott James Remnant:<br>
<div class="im">> On Mon, May 2, 2011 at 9:17 AM, Marc - A. Dahlhaus <<a href="mailto:mad@wol.de">mad@wol.de</a><br>
</div><div class="im">> <mailto:<a href="mailto:mad@wol.de">mad@wol.de</a>>> wrote:<br>
><br>
><br>
>     Hallo List,<br>
><br>
><br>
>     as slapd requires that it receives a SIGINT on user initiated stopping<br>
>     of service and will easily eat the directory-database for lunch if<br>
>     anything higher like SIGTERM or SIGKILL is used, there is currently no<br>
>     way to create a proper init conf for this daemon.<br>
><br>
>     To get around this situation i plan to add an "stopsignal SIGNAL" stanza<br>
>     to upstart. SIGNAL could be INT, USR1, USR2 or TERM(the default).<br>
>     I intentionally left out KILL here as it is used by upstart after the<br>
>     "kill timeout" exceeds.<br>
><br>
>     I'm in the middle of implementing the stanza and change the system_kill<br>
>     functions second param trom "bool force" to "int signal" and on signal<br>
>     == 0 sending SIGKILL to the process...<br>
><br>
>     I'll send the patches after i have tested that they work as expected...<br>
><br>
>     Marc<br>
><br>
> Great! Looks forwards to that patch, make sure you get test coverage.<br>
><br>
> I'm going to be doing a 1.3 release soon, it'd be good to get it in<br>
> there - how long do you think it will take?<br>
><br>
<br>
</div>A matter of a few hours...<br>
<br>
Talked about the topic with SpamapS on irc and he suggested that we<br>
choos another stanza for it as there is a bug open for sending another<br>
signal than HUP on reload...<br>
<br>
Maybe we better use "signal {stop,reload} SIGNAL" for it?!<br>
<br>
</blockquote><div>I would prefer:</div><div><br></div><div>  kill signal HUP</div><div><br></div><div>since that goes better with timeout, etc. There should already be the code to translate signal names (normal exit uses it)</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">The odd thing is that we have to change the way the reload works than as<br>
initctl has to inform upstart about the reload and upstart hat to send<br>
the configured signal or HUP by default to the job then...<br>
<br></blockquote><div>Ignore the reload issue for now, eventually I suspect we'll add "signal" as an alternative to "exec" and "script" so that:</div><div><br></div><div>  reload signal HUP</div>
<div>  reload exec ...</div><div>  reload script ...</div><div>  end script</div><div><br></div><div>Would all be valid expressions. In which case "kill signal" would be entirely appropriate.<br></div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Then we could also rename the system_kill function to system_signal_send<br>
and reuse it for the reloading also...<br>
<br>
The reload handling through upstart itself would be a matter of weeks<br>
for me as i'm not that familiar with the interprocess communication used<br>
by initctl and upstart (it's handled via dbus right?)...<br>
<br>
Maybe you or someone more familiar from the ubuntu/canonical folks can<br>
take over that part? ;)<br>
<div class="im"><br></div></blockquote><div>Yeah, I wouldn't worry about it for now.</div><div><br></div><div>Scott</div></div>