core: add RestartSteps= and RestartSecMax= for exponentially increasing

interval between restarts

RestartSteps= accepts a positive integer as the number of steps
to take to increase the interval between auto-restarts from
RestartSec= to RestartSecMax=, or 0 to disable it.

Closes #6129
This commit is contained in:
Mike Yuan
2023-03-27 19:31:12 +08:00
parent f447b74185
commit be1adc27fc
7 changed files with 99 additions and 4 deletions
+19
View File
@@ -610,6 +610,25 @@
as "5min 20s". Defaults to 100ms.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>RestartSteps=</varname></term>
<listitem><para>Configures the number of steps to take to increase the interval
of auto-restarts from <varname>RestartSec=</varname> to <varname>RestartSecMax=</varname>.
Takes a positive integer or 0 to disable it. Defaults to 0.</para>
<para>This setting is effective only if <varname>RestartSecMax=</varname> is also set.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>RestartSecMax=</varname></term>
<listitem><para>Configures the longest time to sleep before restarting a service
as the interval goes up with <varname>RestartSteps=</varname>. Takes a value
in the same format as <varname>RestartSec=</varname>, or <literal>infinity</literal>
to disable the setting. Defaults to <literal>infinity</literal>.</para>
<para>This setting is effective only if <varname>RestartSteps=</varname> is also set.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>TimeoutStartSec=</varname></term>
<listitem><para>Configures the time to wait for start-up. If a daemon service does not signal