- db2: avoid promoting in STANDBY/REMOTE_CATCHUP_PENDING state
Resolves: RHEL-166371
This commit is contained in:
parent
be90666493
commit
32a40dcae4
@ -0,0 +1,52 @@
|
||||
From 18f01d598fb654ed629d27d69c2bfccd74cef4a8 Mon Sep 17 00:00:00 2001
|
||||
From: Arslan Ahmad <arslan.ahmad97@googlemail.com>
|
||||
Date: Thu, 9 Apr 2026 01:30:58 +0530
|
||||
Subject: [PATCH] db2: Avoid promotion in STANDBY/REMOTE_CATCHUP_PENDING state
|
||||
|
||||
So to prevent data loss, promoting the standby node which is in
|
||||
STANDBY/REMOTE_CATCHUP_PENDING/DISCONNECTED state will be avoided,
|
||||
reporting same in cluster status.
|
||||
|
||||
Fixes #2043
|
||||
|
||||
Signed-off-by: Arslan Ahmad <arslan.ahmad97@googlemail.com>
|
||||
---
|
||||
heartbeat/db2 | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/heartbeat/db2 b/heartbeat/db2
|
||||
index 4420b9989e..744917574b 100755
|
||||
--- a/heartbeat/db2
|
||||
+++ b/heartbeat/db2
|
||||
@@ -944,7 +944,7 @@ db2_promote() {
|
||||
for i in 1 2
|
||||
do
|
||||
hadr=$(db2_hadr_status $db) || return $OCF_ERR_GENERIC
|
||||
- ocf_log info "DB2 database $instance($db2node)/$db has HADR status $hadr and will be promoted"
|
||||
+ ocf_log info "DB2 database $instance($db2node)/$db has HADR status $hadr"
|
||||
|
||||
case "$hadr" in
|
||||
Standard/Standalone)
|
||||
@@ -965,6 +965,7 @@ db2_promote() {
|
||||
done
|
||||
fi
|
||||
|
||||
+ ocf_log info "DB2 database $instance($db2node)/$db is already promoted"
|
||||
return $OCF_SUCCESS
|
||||
;;
|
||||
|
||||
@@ -975,11 +976,12 @@ db2_promote() {
|
||||
STANDBY/*PEER/DISCONNECTED|Standby/DisconnectedPeer)
|
||||
# must take over by force peer window only
|
||||
force="by force peer window only"
|
||||
+ ocf_log info "DB2 database will be promoted using 'by force peer window only' option"
|
||||
;;
|
||||
|
||||
- # must take over by force
|
||||
STANDBY/REMOTE_CATCHUP_PENDING/DISCONNECTED)
|
||||
- force="by force"
|
||||
+ ocf_exit_reason "Promoting database in $hadr state can result in data loss. Manual intervention required."
|
||||
+ return $OCF_ERR_GENERIC
|
||||
;;
|
||||
|
||||
*)
|
||||
@ -45,7 +45,7 @@
|
||||
Name: resource-agents
|
||||
Summary: Open Source HA Reusable Cluster Resource Scripts
|
||||
Version: 4.16.0
|
||||
Release: 71%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
|
||||
Release: 72%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
|
||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||
URL: https://github.com/ClusterLabs/resource-agents
|
||||
Source0: %{upstream_prefix}-%{upstream_version}.tar.gz
|
||||
@ -143,6 +143,7 @@ Patch90: RHEL-180765-3-nfsserver-do-not-try-to-stop-fsidd-when-not-present.patch
|
||||
Patch91: RHEL-182592-nfsserver-monitor-nfsdcld-and-nfs-mountd-services-to-trigger-recovery-on-failure.patch
|
||||
Patch92: RHEL-171167-portblock-add-IPv6-support.patch
|
||||
Patch93: RHEL-183131-portblock-fix-IPv6-rule-detection-in-the-iptables-backend.patch
|
||||
Patch94: RHEL-166371-db2-avoid-promoting-in-standby_remote_catchup_pending-state.patch
|
||||
|
||||
# bundled ha-cloud-support libs
|
||||
Patch500: ha-cloud-support-aliyun.patch
|
||||
@ -407,6 +408,7 @@ exit 1
|
||||
%patch -p1 -P 91
|
||||
%patch -p1 -P 92
|
||||
%patch -p1 -P 93
|
||||
%patch -p1 -P 94
|
||||
|
||||
# bundled ha-cloud-support libs
|
||||
%patch -p1 -P 500
|
||||
@ -739,6 +741,11 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents
|
||||
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
|
||||
|
||||
%changelog
|
||||
* Thu Jul 02 2026 Arslan Ahmad <arahmad@redhat.com> - 4.16.0-72
|
||||
- db2: avoid promoting in STANDBY/REMOTE_CATCHUP_PENDING state
|
||||
|
||||
Resolves: RHEL-166371
|
||||
|
||||
* Fri Jun 19 2026 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.16.0-71
|
||||
- portblock: add IPv6 support
|
||||
- portblock: fix IPv6 rule detection in the iptables backend
|
||||
|
||||
Loading…
Reference in New Issue
Block a user