import Oracle_OSS resource-agents-4.16.0-22.el10_1.10

This commit is contained in:
AlmaLinux RelEng Bot 2026-05-11 11:41:43 -04:00
parent 7e7123baaa
commit bf9b2b6a3e
2 changed files with 151 additions and 1 deletions

View File

@ -0,0 +1,143 @@
From 26c0d48bc69da1859f1ce5205a8bb6eaf6297b81 Mon Sep 17 00:00:00 2001
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
Date: Wed, 25 Mar 2026 10:46:09 +0100
Subject: [PATCH] db2: do not use db2stop, as it sends truncation messages,
which in some cases are not delivered
This caused divergence in the log, and the user would have to manually rebuild
the DB to recover from it.
---
heartbeat/db2 | 104 +++++++-------------------------------------------
1 file changed, 13 insertions(+), 91 deletions(-)
diff --git a/heartbeat/db2 b/heartbeat/db2
index 4420b9989..9de18639d 100755
--- a/heartbeat/db2
+++ b/heartbeat/db2
@@ -596,45 +596,10 @@ db2_start() {
return $OCF_SUCCESS
}
-#
-# helper function to be spawned
-# so we can detect a hang of the db2stop command
-#
-db2_stop_bg() {
- local rc output
- local stop_opts="dbpartitionnum $db2node"
-
- rc=$OCF_SUCCESS
-
- if [ -z "$OCF_RESKEY_dbpartitionnum" ] && ! [ -e "$db2sql/db2nodes.cfg" ]; then
- stop_opts=""
- fi
-
- if output=$(runasdb2 db2stop force $stop_opts)
- then
- ocf_log info "DB2 instance $instance($db2node) stopped: $output"
- else
- case $output in
- *SQL1032N*)
- #SQL1032N No start database manager command was issued
- ocf_log info "$output"
- ;;
-
- *)
- ocf_log err "DB2 instance $instance($db2node) stop failed: $output"
- rc=$OCF_ERR_GENERIC
- esac
- fi
-
- return $rc
-}
-
#
# Stop the given db2 database instance
#
db2_stop() {
- local stop_timeout grace_timeout stop_bg_pid i must_kill
-
# remove master score
master_score -D -l reboot
@@ -647,67 +612,24 @@ db2_stop() {
return $OCF_SUCCESS
fi
- stop_timeout=${OCF_RESKEY_CRM_meta_timeout:-20000}
-
- # grace_time is 4/5 (unit is ms)
- grace_timeout=$((stop_timeout/1250))
-
- # start db2stop in background as this may hang
- db2_stop_bg &
- stop_bg_pid=$!
-
- # wait for grace_timeout
- i=0
- while [ $i -lt $grace_timeout ]
- do
- kill -0 $stop_bg_pid 2>/dev/null || break;
- sleep 1
- i=$((i+1))
- done
-
- # collect exit status but don't hang
- if kill -0 $stop_bg_pid 2>/dev/null
- then
- stoprc=1
- kill -9 $stop_bg_pid 2>/dev/null
- else
- wait $stop_bg_pid
- stoprc=$?
- fi
-
- must_kill=0
-
- if [ $stoprc -ne 0 ]
+ # db2nkill kills *all* partitions on the node
+ if [ -x $db2bin/db2nkill ]
then
- ocf_log warn "DB2 instance $instance($db2node): db2stop failed, using db2nkill"
- must_kill=1
- elif ! db2_instance_dead
+ logasdb2 $db2bin/db2nkill $db2node
+ elif [ -x $db2bin/db2_kill ]
then
- ocf_log warn "DB2 instance $instance($db2node): db2stop indicated success but there a still processes, using db2nkill"
- must_kill=1
+ logasdb2 $db2bin/db2_kill
fi
- if [ $must_kill -eq 1 ]
- then
- # db2nkill kills *all* partitions on the node
- if [ -x $db2bin/db2nkill ]
- then
- logasdb2 $db2bin/db2nkill $db2node
- elif [ -x $db2bin/db2_kill ]
- then
- logasdb2 $db2bin/db2_kill
- fi
-
- # loop forever (or lrmd kills us due to timeout) until the
- # instance is dead
- while ! db2_instance_dead
- do
- ocf_log info "DB2 instance $instance($db2node): waiting for processes to exit"
- sleep 1
- done
+ # loop forever (or lrmd kills us due to timeout) until the
+ # instance is dead
+ while ! db2_instance_dead
+ do
+ ocf_log info "DB2 instance $instance($db2node): waiting for processes to exit"
+ sleep 1
+ done
- ocf_log info "DB2 instance $instance($db2node) is now dead"
- fi
+ ocf_log info "DB2 instance $instance($db2node) is now dead"
return $OCF_SUCCESS
}

View File

@ -45,7 +45,7 @@
Name: resource-agents
Summary: Open Source HA Reusable Cluster Resource Scripts
Version: 4.16.0
Release: 22%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}.9
Release: 22%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}.10
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
@ -91,6 +91,7 @@ Patch38: RHEL-116197-1-ocf-shellfuncs-add-ocf_promotion_score.patch
Patch39: RHEL-116197-2-portblock-add-promotable-support.patch
Patch40: RHEL-116197-3-portblock-fixes-add-method-and-status_check-parameters.patch
Patch41: RHEL-116197-4-portblock-check-inverse-action.patch
Patch42: RHEL-166745-db2-do-not-use-db2stop-to-avoid-divergence-in-the-log.patch
# bundled ha-cloud-support libs
Patch500: ha-cloud-support-aliyun.patch
@ -291,6 +292,7 @@ exit 1
%patch -p1 -P 39
%patch -p1 -P 40
%patch -p1 -P 41
%patch -p1 -P 42
# bundled ha-cloud-support libs
%patch -p1 -P 500
@ -621,6 +623,11 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
%changelog
* Wed Apr 29 2026 Arslan Ahmad <arahmad@redhat.com> - 4.16.0-22.10
- db2: do not use db2stop to avoid divergence in the log
Resolves: RHEL-166745
* Fri Feb 27 2026 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.16.0-22.9
- portblock: add promotable support, and method and status_check
parameters