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

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