[systemd-bugs] [Bug 87799] RFE: OnFailure version which is used when StartLimitBurst= or StartLimitInterval= are hit

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Feb 3 04:43:20 PST 2015


https://bugs.freedesktop.org/show_bug.cgi?id=87799

--- Comment #7 from Lennart Poettering <lennart at poettering.net> ---
(In reply to Mikhail Kasimov from comment #6)
> > I think the docs could be improved about this.
> 
> Possibly, so.
> 
> So, if StartLimitBurst\StartLimitInterval are not defined, systemd tries to
> restart service unlimited times, and if OnFailure=alarm-message.sh, admin
> will recieve alarm-message on every service failure.
> 
> And if StartLimitBurst\StartLimitInterval are defined,
> OnFailure=alarm-message.sh will work off after
> StartLimitBurst\StartLimitInterval limits are reached.
> 
> Do I understand it right?

Nope. 

By default StartLimitBurst= defaults to 5 and StartLimitInterval= defaults to
10s. Restart= defaults to no.

With these settings OnFailure= will be triggered on the first failure, and no
restart is attempted.

If you enable Restart=, then OnFailure= will only be triggered after the
StartLimit is hit. 

If you disable the StartLimit then the service will be restarted into all
eternity, and OnFailure= will never be triggred.

That's at least how it should work. If the code behaviour doesn't match this
then I#d consider this a bug, and we should fix it.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20150203/009a70a1/attachment.html>


More information about the systemd-bugs mailing list