File 0023-galera-Log-message-when-changing-content-of-grastate.patch of Package resource-agents.11761

From 1683e5e93a16d98681d97a678169e5ec6bec2c31 Mon Sep 17 00:00:00 2001
From: Thomas Bechtold <tbechtold@suse.com>
Date: Tue, 21 May 2019 16:47:34 +0200
Subject: [PATCH 1/5] galera: Log message when changing content of grastate.dat
 file

There is one case in the RA which changes the grastate.dat file for
galera. Write a log message when the file is changed.
This is useful when trying to find out why "safe_to_bootstrap" was
set.
---
 heartbeat/galera | 1 +
 1 file changed, 1 insertion(+)

diff --git a/heartbeat/galera b/heartbeat/galera
index d83a96d7..f3cde2c5 100755
--- a/heartbeat/galera
+++ b/heartbeat/galera
@@ -686,6 +686,7 @@ galera_promote()
             # bootstrapping anyways
             if [ "$(get_safe_to_bootstrap)" = "0" ]; then
                 sed -ie 's/^\(safe_to_bootstrap:\) 0/\1 1/' ${OCF_RESKEY_datadir}/grastate.dat
+                ocf_log info "safe_to_bootstrap in ${OCF_RESKEY_datadir}/grastate.dat set to 1 on node ${NODENAME}"
             fi
             ocf_log info "Node <${NODENAME}> is bootstrapping the cluster"
             extra_opts="--wsrep-cluster-address=gcomm://"
-- 
2.16.4

openSUSE Build Service is sponsored by