Blame SOURCES/100-default-to-syncing-with-sbd.patch

c563b9
From 34b2d8ab82dcdf49535c74e6a580240455498759 Mon Sep 17 00:00:00 2001
c563b9
From: Klaus Wenninger <klaus.wenninger@aon.at>
c563b9
Date: Wed, 2 Dec 2020 22:51:33 +0100
c563b9
Subject: [PATCH] default to syncing with sbd
c563b9
c563b9
---
c563b9
 lib/common/watchdog.c | 10 +++++++---
c563b9
 1 file changed, 7 insertions(+), 3 deletions(-)
c563b9
c563b9
diff --git a/lib/common/watchdog.c b/lib/common/watchdog.c
c563b9
index 03ee7f1..bf5df18 100644
c563b9
--- a/lib/common/watchdog.c
c563b9
+++ b/lib/common/watchdog.c
c563b9
@@ -244,12 +244,16 @@ pcmk__get_sbd_timeout(void)
c563b9
 bool
c563b9
 pcmk__get_sbd_sync_resource_startup(void)
c563b9
 {
c563b9
-    static bool sync_resource_startup = false;
c563b9
+    static bool sync_resource_startup = true; // default overruled by env
c563b9
     static bool checked_sync_resource_startup = false;
c563b9
 
c563b9
     if (!checked_sync_resource_startup) {
c563b9
-        sync_resource_startup =
c563b9
-            crm_is_true(getenv("SBD_SYNC_RESOURCE_STARTUP"));
c563b9
+        gboolean ret = FALSE;
c563b9
+        const char *s = getenv("SBD_SYNC_RESOURCE_STARTUP");
c563b9
+
c563b9
+        if ((s != NULL) && (crm_str_to_boolean(s, &ret) > 0)) {
c563b9
+            sync_resource_startup = ret;
c563b9
+        }
c563b9
         checked_sync_resource_startup = true;
c563b9
     }
c563b9
 
c563b9
-- 
c563b9
1.8.3.1
c563b9