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

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