Blob Blame History Raw
From a3618369ff99b71298dbd6bf6f00c61be2428e9b Mon Sep 17 00:00:00 2001
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
Date: Mon, 18 May 2020 16:18:21 +0200
Subject: [PATCH] db2: HADR add STANDBY/REMOTE_CATCHUP_PENDING/DISCONNECTED to
 correctly promote standby node when master node disappears (e.g. via fencing)

---
 heartbeat/db2 | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/heartbeat/db2 b/heartbeat/db2
index 62b288d46..a57fd2bb6 100755
--- a/heartbeat/db2
+++ b/heartbeat/db2
@@ -774,14 +774,19 @@ db2_promote() {
             ;;
 
             STANDBY/PEER/CONNECTED|Standby/Peer)
-            # must take over 
+            # must take over
             ;;
 
             STANDBY/*PEER/DISCONNECTED|Standby/DisconnectedPeer)
-            # must take over forced 
+            # must take over by force peer window only
             force="by force peer window only"
             ;;
 
+            # must take over by force
+            STANDBY/REMOTE_CATCHUP_PENDING/DISCONNECTED)
+            force="by force"
+            ;;
+
             *)
             return $OCF_ERR_GENERIC
         esac