path unit: add TriggerLimitBurst= and TriggerLimitIntervalSec=

Given there's now a default for these settings, also allow users to configure
them, matching socket units
This commit is contained in:
Luca Boccassi
2021-12-18 23:17:53 +00:00
parent ef1aa10692
commit 47dba9fb09
7 changed files with 63 additions and 4 deletions
+15
View File
@@ -186,6 +186,21 @@
in question. Takes an access mode in octal notation. Defaults
to <option>0755</option>.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>TriggerLimitIntervalSec=</varname></term>
<term><varname>TriggerLimitBurst=</varname></term>
<listitem><para>Configures a limit on how often this path unit may be activated within a specific time
interval. The <varname>TriggerLimitIntervalSec=</varname> may be used to configure the length of the time
interval in the usual time units <literal>us</literal>, <literal>ms</literal>, <literal>s</literal>,
<literal>min</literal>, <literal>h</literal>, … and defaults to 2s (See
<citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry> for details on
the various time units understood). The <varname>TriggerLimitBurst=</varname> setting takes a positive integer
value and specifies the number of permitted activations per time interval, and defaults to 200. Set either to
0 to disable any form of trigger rate limiting. If the limit is hit, the unit is placed into a failure mode,
and will not watch the path(s) anymore until restarted. Note that this limit is enforced before the service
activation is enqueued.</para></listitem>
</varlistentry>
</variablelist>
<xi:include href="systemd.service.xml" xpointer="shared-unit-options" />