Blame SOURCES/bz1836945-db2-hadr-promote-standby-node.patch

d42a06
From a3618369ff99b71298dbd6bf6f00c61be2428e9b Mon Sep 17 00:00:00 2001
d42a06
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
d42a06
Date: Mon, 18 May 2020 16:18:21 +0200
d42a06
Subject: [PATCH] db2: HADR add STANDBY/REMOTE_CATCHUP_PENDING/DISCONNECTED to
d42a06
 correctly promote standby node when master node disappears (e.g. via fencing)
d42a06
d42a06
---
d42a06
 heartbeat/db2 | 9 +++++++--
d42a06
 1 file changed, 7 insertions(+), 2 deletions(-)
d42a06
d42a06
diff --git a/heartbeat/db2 b/heartbeat/db2
d42a06
index 62b288d46..a57fd2bb6 100755
d42a06
--- a/heartbeat/db2
d42a06
+++ b/heartbeat/db2
d42a06
@@ -774,14 +774,19 @@ db2_promote() {
d42a06
             ;;
d42a06
 
d42a06
             STANDBY/PEER/CONNECTED|Standby/Peer)
d42a06
-            # must take over 
d42a06
+            # must take over
d42a06
             ;;
d42a06
 
d42a06
             STANDBY/*PEER/DISCONNECTED|Standby/DisconnectedPeer)
d42a06
-            # must take over forced 
d42a06
+            # must take over by force peer window only
d42a06
             force="by force peer window only"
d42a06
             ;;
d42a06
 
d42a06
+            # must take over by force
d42a06
+            STANDBY/REMOTE_CATCHUP_PENDING/DISCONNECTED)
d42a06
+            force="by force"
d42a06
+            ;;
d42a06
+
d42a06
             *)
d42a06
             return $OCF_ERR_GENERIC
d42a06
         esac