[RFC] stopsignal stanza
Marc - A. Dahlhaus
mad at wol.de
Mon May 2 17:54:21 UTC 2011
Am 02.05.2011 19:20, schrieb Scott James Remnant:
> On Mon, May 2, 2011 at 9:17 AM, Marc - A. Dahlhaus <mad at wol.de
> <mailto:mad at wol.de>> wrote:
>
>
> Hallo List,
>
>
> as slapd requires that it receives a SIGINT on user initiated stopping
> of service and will easily eat the directory-database for lunch if
> anything higher like SIGTERM or SIGKILL is used, there is currently no
> way to create a proper init conf for this daemon.
>
> To get around this situation i plan to add an "stopsignal SIGNAL" stanza
> to upstart. SIGNAL could be INT, USR1, USR2 or TERM(the default).
> I intentionally left out KILL here as it is used by upstart after the
> "kill timeout" exceeds.
>
> I'm in the middle of implementing the stanza and change the system_kill
> functions second param trom "bool force" to "int signal" and on signal
> == 0 sending SIGKILL to the process...
>
> I'll send the patches after i have tested that they work as expected...
>
> Marc
>
> Great! Looks forwards to that patch, make sure you get test coverage.
>
> I'm going to be doing a 1.3 release soon, it'd be good to get it in
> there - how long do you think it will take?
>
A matter of a few hours...
Talked about the topic with SpamapS on irc and he suggested that we
choos another stanza for it as there is a bug open for sending another
signal than HUP on reload...
Maybe we better use "signal {stop,reload} SIGNAL" for it?!
The odd thing is that we have to change the way the reload works than as
initctl has to inform upstart about the reload and upstart hat to send
the configured signal or HUP by default to the job then...
Then we could also rename the system_kill function to system_signal_send
and reuse it for the reloading also...
The reload handling through upstart itself would be a matter of weeks
for me as i'm not that familiar with the interprocess communication used
by initctl and upstart (it's handled via dbus right?)...
Maybe you or someone more familiar from the ubuntu/canonical folks can
take over that part? ;)
> OT:
>
>
> Do i have to get through any legal or copyright stuff before i can
> contribute to upstart?
>
> No.
Nice.
> Scott
thanks,
Marc
More information about the upstart-devel
mailing list