[RFC] stopsignal stanza

Scott James Remnant scott at netsplit.com
Mon May 2 17:58:18 UTC 2011


On Mon, May 2, 2011 at 10:54 AM, Marc - A. Dahlhaus <mad at wol.de> wrote:

> 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?!
>
> I would prefer:

  kill signal HUP

since that goes better with timeout, etc. There should already be the code
to translate signal names (normal exit uses 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...
>
> Ignore the reload issue for now, eventually I suspect we'll add "signal" as
an alternative to "exec" and "script" so that:

  reload signal HUP
  reload exec ...
  reload script ...
  end script

Would all be valid expressions. In which case "kill signal" would be
entirely appropriate.


> 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? ;)
>
> Yeah, I wouldn't worry about it for now.

Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/upstart-devel/attachments/20110502/0192d624/attachment-0001.html>


More information about the upstart-devel mailing list