Blame SOURCES/020-systemd-unit.patch

533c21
From e316840a7e1d2a72e3089ee194334244c959905a Mon Sep 17 00:00:00 2001
533c21
From: Ken Gaillot <kgaillot@redhat.com>
533c21
Date: Wed, 19 Jan 2022 09:53:53 -0600
533c21
Subject: [PATCH] Fix: pacemakerd: tweak systemd unit respawn settings
533c21
533c21
If pacemaker exits immediately after starting, wait 1 second before trying to
533c21
respawn, since the default of 100ms is a bit aggressive for a Pacemaker
533c21
cluster.
533c21
533c21
Also, allow 5 attempts in 25 seconds before giving up.
533c21
---
533c21
 daemons/pacemakerd/pacemaker.service.in | 6 ++++++
533c21
 1 file changed, 6 insertions(+)
533c21
533c21
diff --git a/daemons/pacemakerd/pacemaker.service.in b/daemons/pacemakerd/pacemaker.service.in
533c21
index 0363a2259c..3fd53d9ffb 100644
533c21
--- a/daemons/pacemakerd/pacemaker.service.in
533c21
+++ b/daemons/pacemakerd/pacemaker.service.in
533c21
@@ -31,6 +31,9 @@ After=rsyslog.service
533c21
 After=corosync.service
533c21
 Requires=corosync.service
533c21
 
533c21
+# If Pacemaker respawns repeatedly, give up after this many tries in this time
533c21
+StartLimitBurst=5
533c21
+StartLimitIntervalSec=25s
533c21
 
533c21
 [Install]
533c21
 WantedBy=multi-user.target
533c21
@@ -57,6 +60,9 @@ TasksMax=infinity
533c21
 # resource.  Sending -KILL will just get the node fenced
533c21
 SendSIGKILL=no
533c21
 
533c21
+# Systemd's default of respawning a failed service after 100ms is too aggressive
533c21
+RestartSec=1s
533c21
+
533c21
 # If we ever hit the StartLimitInterval/StartLimitBurst limit, and the
533c21
 # admin wants to stop the cluster while pacemakerd is not running, it
533c21
 # might be a good idea to enable the ExecStopPost directive below.
533c21
-- 
533c21
2.27.0
533c21