From 3ec219971bab7fe68ad2dce073cad7df8ef94256 Mon Sep 17 00:00:00 2001 From: Klaus Wenninger Date: Feb 24 2021 16:09:06 +0000 Subject: default to syncing with sbd patch_name: 100-default-to-syncing-with-sbd.patch present_in_specfile: true location_in_specfile: 39 squash_commits: true --- diff --git a/lib/common/watchdog.c b/lib/common/watchdog.c index 03ee7f1..bf5df18 100644 --- a/lib/common/watchdog.c +++ b/lib/common/watchdog.c @@ -244,12 +244,16 @@ pcmk__get_sbd_timeout(void) bool pcmk__get_sbd_sync_resource_startup(void) { - static bool sync_resource_startup = false; + static bool sync_resource_startup = true; // default overruled by env static bool checked_sync_resource_startup = false; if (!checked_sync_resource_startup) { - sync_resource_startup = - crm_is_true(getenv("SBD_SYNC_RESOURCE_STARTUP")); + gboolean ret = FALSE; + const char *s = getenv("SBD_SYNC_RESOURCE_STARTUP"); + + if ((s != NULL) && (crm_str_to_boolean(s, &ret) > 0)) { + sync_resource_startup = ret; + } checked_sync_resource_startup = true; }