<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - RFE: OnFailure version which is used when StartLimitBurst= or StartLimitInterval= are hit"
href="https://bugs.freedesktop.org/show_bug.cgi?id=87799#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - RFE: OnFailure version which is used when StartLimitBurst= or StartLimitInterval= are hit"
href="https://bugs.freedesktop.org/show_bug.cgi?id=87799">bug 87799</a>
from <span class="vcard"><a class="email" href="mailto:lennart@poettering.net" title="Lennart Poettering <lennart@poettering.net>"> <span class="fn">Lennart Poettering</span></a>
</span></b>
<pre>(In reply to Mikhail Kasimov from <a href="show_bug.cgi?id=87799#c6">comment #6</a>)
<span class="quote">> > 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?</span >
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>