diff options
author | Daniel Black <danielgb@au.ibm.com> | 2017-12-14 12:17:43 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-12-14 12:17:43 +0100 |
commit | a327431bd168b2f327f3cd422379e213c643f2a5 (patch) | |
tree | 579e571140c7015f4d4d48d6e2a8558c097688ae /man | |
parent | Merge pull request #7625 from thom311/th/const-strlen (diff) | |
download | systemd-a327431bd168b2f327f3cd422379e213c643f2a5.tar.xz systemd-a327431bd168b2f327f3cd422379e213c643f2a5.zip |
core: add EXTEND_TIMEOUT_USEC={usec} - prevent timeouts in startup/runtime/shutdown (#7214)
With Type=notify services, EXTEND_TIMEOUT_USEC= messages will delay any startup/
runtime/shutdown timeouts.
A service that hasn't timed out, i.e, start time < TimeStartSec,
runtime < RuntimeMaxSec and stop time < TimeoutStopSec, may by sending
EXTEND_TIMEOUT_USEC=, allow the service to continue beyond the limit for
the execution phase (i.e TimeStartSec, RunTimeMaxSec and TimeoutStopSec).
EXTEND_TIMEOUT_USEC= must continue to be sent (in the same way as
WATCHDOG=1) within the time interval specified to continue to reprevent
the timeout from occuring.
Watchdog timeouts are also extended if a EXTEND_TIMEOUT_USEC is greater
than the remaining time on the watchdog counter.
Fixes #5868.
Diffstat (limited to 'man')
-rw-r--r-- | man/sd_notify.xml | 12 | ||||
-rw-r--r-- | man/systemd.service.xml | 28 |
2 files changed, 39 insertions, 1 deletions
diff --git a/man/sd_notify.xml b/man/sd_notify.xml index a53b1ab33e..c28f303c7e 100644 --- a/man/sd_notify.xml +++ b/man/sd_notify.xml @@ -212,6 +212,18 @@ </varlistentry> <varlistentry> + <term>EXTEND_TIMEOUT_USEC=…</term> + + <listitem><para>Tells the service manager to extend the startup, runtime or shutdown service timeout + corresponding the current state. The value specified is a time in microseconds during which the service must + send a new message. A service timeout will occur if the message isn't received, but only if the runtime of the + current state is beyond the original maximium times of <varname>TimeoutStartSec=</varname>, <varname>RuntimeMaxSec=</varname>, + and <varname>TimeoutStopSec=</varname>. + See <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry> + for effects on the service timeouts.</para></listitem> + </varlistentry> + + <varlistentry> <term>FDSTORE=1</term> <listitem><para>Stores additional file descriptors in the service manager. File descriptors sent this way will diff --git a/man/systemd.service.xml b/man/systemd.service.xml index ada92369e1..76dfe60be4 100644 --- a/man/systemd.service.xml +++ b/man/systemd.service.xml @@ -517,6 +517,15 @@ <varname>Type=oneshot</varname> is used, in which case the timeout is disabled by default (see <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>). + </para> + + <para>If a service of <varname>Type=notify</varname> sends <literal>EXTEND_TIMEOUT_USEC=…</literal>, this may cause + the start time to be extended beyond <varname>TimeoutStartSec=</varname>. The first receipt of this message + must occur before <varname>TimeoutStartSec=</varname> is exceeded, and once the start time has exended beyond + <varname>TimeoutStartSec=</varname>, the service manager will allow the service to continue to start, provided + the service repeats <literal>EXTEND_TIMEOUT_USEC=…</literal> within the interval specified until the service + startup status is finished by <literal>READY=1</literal>. (see + <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>). </para></listitem> </varlistentry> @@ -535,6 +544,14 @@ <varname>DefaultTimeoutStopSec=</varname> from the manager configuration file (see <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>). + </para> + + <para>If a service of <varname>Type=notify</varname> sends <literal>EXTEND_TIMEOUT_USEC=…</literal>, this may cause + the stop time to be extended beyond <varname>TimeoutStopSec=</varname>. The first receipt of this message + must occur before <varname>TimeoutStopSec=</varname> is exceeded, and once the stop time has exended beyond + <varname>TimeoutStopSec=</varname>, the service manager will allow the service to continue to stop, provided + the service repeats <literal>EXTEND_TIMEOUT_USEC=…</literal> within the interval specified, or terminates itself + (see <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>). </para></listitem> </varlistentry> @@ -553,7 +570,16 @@ active for longer than the specified time it is terminated and put into a failure state. Note that this setting does not have any effect on <varname>Type=oneshot</varname> services, as they terminate immediately after activation completed. Pass <literal>infinity</literal> (the default) to configure no runtime - limit.</para></listitem> + limit.</para> + + <para>If a service of <varname>Type=notify</varname> sends <literal>EXTEND_TIMEOUT_USEC=…</literal>, this may cause + the runtime to be extended beyond <varname>RuntimeMaxSec=</varname>. The first receipt of this message + must occur before <varname>RuntimeMaxSec=</varname> is exceeded, and once the runtime has exended beyond + <varname>RuntimeMaxSec=</varname>, the service manager will allow the service to continue to run, provided + the service repeats <literal>EXTEND_TIMEOUT_USEC=…</literal> within the interval specified until the service + shutdown is acheived by <literal>STOPPING=1</literal> (or termination). (see + <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>). + </para></listitem> </varlistentry> <varlistentry> |