[systemd-devel] systemd restart patch

Lennart Poettering lennart at poettering.net
Tue Feb 8 09:24:13 PST 2011


On Tue, 08.02.11 14:28, Cristian Patrascu (Cristian.Patrascu at windriver.com) wrote:

> >I think tis current behaviour probably makes little sense, so my
> >suggestion would be to simply change it and run the services listed in
> >OnFailure= only after we tried to restart the service and gave up.
> >
> >So here's what I'd suggest:
> >
> >a) Introduce RestartRetries= as you suggested
> >
> >b) Reshuffle things so that OnFailure= is run only after RestartRetries=
> >    is reached when it is set or each time if RestartRetries= is not set.
> >
> >c) Do not introduce ExecPostRestarts=
> >
> >I think this would be a very simple, minimal and natural extension and
> >should do everything you need, right? I'd be happy to merge such a patch!
> >
> >Lennart
> >
> Hi Lennart, thanks for your input.
> 
> a) I think it's better to rename "RestartRetries" to
> "RestartRetriesOnFailure" so there will be no confusion. Do you
> agree?

Hmm, not necessarily. I think it's pretty clear that we won't retry
restarting if things didn't fail in the first place. In fact I think in
the english language the word "retry" already implies for most people
that there was first something that failed.

However, I think it would make sense to call it "MaxRestartRetries"
(i.e. prefix wit 'Max') to mimic the "MaxConnections" option we already
have for sockets. I think the prefix "Max" as indication that something
is an upper limit is a good scheme to adopt. Also, this would allow us
to expose the current restart retry counter as dbus property under the
name "RestartRetries".

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list