paunch/paunch/utils
Bogdan Dobrelya 5b5e578cc5 Fix systemd service start rate limiting
The default limit is to allow 5 restarts in a 10sec period. If a
service goes over that threshold due to the Restart= config option in
the service definition, it will not attempt to restart any further.

We should not set StartLimitIntervalSec to 0 to disable any kind of
rate limiting as that may end up impacting the node load.

Instead, use tenacity to retry with an exponential backoff, when the
service unit enablement fails. Before to retry it, reset the unit's
failure counters with the systemctl wrapper. This is a crash-loop
approach that provides an efficient feature parity to the classic
rate limiting, shall we want to implement that for the systemctl
command wrapper instead.

Closes-bug: #1839841

Change-Id: I537fbf9933f2cbe6e1c2f627ba77da645bd55f25
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
(cherry picked from commit 2eaebe2cd9)
2019-08-15 14:21:51 -04:00
..
__init__.py podman: create/delete systemd unit files when restart policy is used 2018-10-02 16:43:14 -04:00
common.py Log warnings and other paunch info to stderr 2019-01-11 13:52:39 +01:00
systemctl.py Fix systemd service start rate limiting 2019-08-15 14:21:51 -04:00
systemd.py Generate addition drop-in dependencies for podman containers 2019-08-01 18:52:33 +02:00