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

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