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

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