Blame SOURCES/019-corosync-tracking.patch

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