Blame SOURCES/019-corosync-tracking.patch

97a979
From e8bf0161b872267f1bb7143a9866fdc15ec218f2 Mon Sep 17 00:00:00 2001
97a979
From: Jan Friesse <jfriesse@redhat.com>
97a979
Date: Tue, 18 Jan 2022 16:35:24 +0100
97a979
Subject: [PATCH] Fix: corosync: Repeat corosync_cfg_trackstart
97a979
97a979
corosync_cfg_trackstart can fail with CS_ERR_TRY_AGAIN failure so
97a979
(similarly as for corosync_cfg_local_get, ...) handle failure with
97a979
using cs_repeat macro.
97a979
---
97a979
 daemons/pacemakerd/pcmkd_corosync.c | 3 ++-
97a979
 1 file changed, 2 insertions(+), 1 deletion(-)
97a979
97a979
diff --git a/daemons/pacemakerd/pcmkd_corosync.c b/daemons/pacemakerd/pcmkd_corosync.c
97a979
index 7990bc43c5..cd7a40321d 100644
97a979
--- a/daemons/pacemakerd/pcmkd_corosync.c
97a979
+++ b/daemons/pacemakerd/pcmkd_corosync.c
97a979
@@ -186,7 +186,8 @@ cluster_connect_cfg(void)
97a979
     crm_debug("Corosync reports local node ID is %lu", (unsigned long) nodeid);
97a979
 
97a979
 #ifdef HAVE_COROSYNC_CFG_TRACKSTART
97a979
-    rc = corosync_cfg_trackstart(cfg_handle, 0);
97a979
+    retries = 0;
97a979
+    cs_repeat(retries, 30, rc = corosync_cfg_trackstart(cfg_handle, 0));
97a979
     if (rc != CS_OK) {
97a979
         crm_crit("Could not enable Corosync CFG shutdown tracker: %s " CRM_XS " rc=%d",
97a979
                  cs_strerror(rc), rc);
97a979
-- 
97a979
2.27.0
97a979