- podman-etcd: fix count of fnc_holders in container_health_check
Resolves: RHEL-126087
This commit is contained in:
parent
8e9dc0dd76
commit
97454c937d
@ -0,0 +1,47 @@
|
||||
From a155018f6d65edf99493804dad99412b50d13e6c Mon Sep 17 00:00:00 2001
|
||||
From: Carlo Lobrano <c.lobrano@gmail.com>
|
||||
Date: Wed, 5 Nov 2025 13:48:38 +0100
|
||||
Subject: [PATCH] podman-etcd: fix count of fnc holders in
|
||||
container_health_check
|
||||
|
||||
The variable `fnc_holders` (a list of nodes that have force_new_cluster
|
||||
CIB attribute set) can contain empty spaces. Because of this, the
|
||||
shell's simple `-n` test is not enough to establish if there are no
|
||||
`fnc_holders`.
|
||||
|
||||
Fixed counting the number of words inside the variable.
|
||||
|
||||
Moreover
|
||||
* Enhanced comment for clarity.
|
||||
* Log level changed to `info`. We want visibility when the monitor
|
||||
detects the peer node is ready for recovery, and this is rare enough
|
||||
not to flood the logs.
|
||||
---
|
||||
heartbeat/podman-etcd | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/heartbeat/podman-etcd b/heartbeat/podman-etcd
|
||||
index 5bdc6d184..7795130a6 100755
|
||||
--- a/heartbeat/podman-etcd
|
||||
+++ b/heartbeat/podman-etcd
|
||||
@@ -1366,7 +1366,7 @@ container_health_check()
|
||||
return
|
||||
fi
|
||||
|
||||
- # State file exists - the container failed, check recovery status in this lifecycle
|
||||
+ # Could not execute monitor check command and state file exists - the container failed, check recovery status in this lifecycle
|
||||
local time_since_heartbeat
|
||||
time_since_heartbeat=$(get_time_since_last_heartbeat)
|
||||
ocf_log err "Container ${CONTAINER} failed (last healthy: ${time_since_heartbeat}s ago)"
|
||||
@@ -1379,8 +1379,9 @@ container_health_check()
|
||||
return
|
||||
fi
|
||||
|
||||
- if [ -n "$fnc_holders" ]; then
|
||||
- ocf_log debug "force_new_cluster detected (set by: $fnc_holders), triggering restart"
|
||||
+ local fnc_holder_count=$(echo "$fnc_holders" | wc -w)
|
||||
+ if [ "$fnc_holder_count" -gt 0 ]; then
|
||||
+ ocf_log info "force_new_cluster detected (set by: $fnc_holders), triggering restart"
|
||||
echo "failed-restart-now"
|
||||
return
|
||||
fi
|
||||
@ -45,7 +45,7 @@
|
||||
Name: resource-agents
|
||||
Summary: Open Source HA Reusable Cluster Resource Scripts
|
||||
Version: 4.10.0
|
||||
Release: 99%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
|
||||
Release: 100%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
|
||||
License: GPLv2+ and LGPLv2+
|
||||
URL: https://github.com/ClusterLabs/resource-agents
|
||||
Source0: %{upstream_prefix}-%{upstream_version}.tar.gz
|
||||
@ -186,10 +186,11 @@ Patch133: RHEL-109485-2-nfsserver-fix-error-message.patch
|
||||
Patch134: RHEL-114489-3-powervs-move-ip-add-iflabel-parameter.patch
|
||||
Patch135: RHEL-127006-storage_mon-fix-handling-of-4k-block-devices.patch
|
||||
Patch136: RHEL-127891-podman-etcd-exclude-stopping-resources-from-active-count.patch
|
||||
Patch137: RHEL-126087-podman-etcd-add-container-crash-detection-with-coordinated-recovery.patch
|
||||
Patch137: RHEL-126087-1-podman-etcd-add-container-crash-detection-with-coordinated-recovery.patch
|
||||
Patch138: RHEL-121986-Filesystem-speed-up-get-PIDs.patch
|
||||
Patch139: RHEL-130580-1-podman-etcd-prevent-last-active-member-from-leaving.patch
|
||||
Patch140: RHEL-130580-2-podman-etcd-remove-test-code.patch
|
||||
Patch141: RHEL-126087-2-podman-etcd-fix-count-of-fnc-holders-in-container_health_check.patch
|
||||
|
||||
# bundled ha-cloud-support libs
|
||||
Patch500: ha-cloud-support-aliyun.patch
|
||||
@ -475,6 +476,7 @@ exit 1
|
||||
%patch -p1 -P 138
|
||||
%patch -p1 -P 139
|
||||
%patch -p1 -P 140
|
||||
%patch -p1 -P 141
|
||||
|
||||
# bundled ha-cloud-support libs
|
||||
%patch -p1 -P 500
|
||||
@ -807,6 +809,11 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents
|
||||
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
|
||||
|
||||
%changelog
|
||||
* Tue Nov 25 2025 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-100
|
||||
- podman-etcd: add container crash detection with coordinated recovery
|
||||
|
||||
Resolves: RHEL-126087
|
||||
|
||||
* Mon Nov 24 2025 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-99
|
||||
- podman-etcd: prevent last active member from leaving the etcd member
|
||||
list
|
||||
@ -820,9 +827,8 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents
|
||||
|
||||
* Thu Nov 13 2025 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-97
|
||||
- podman-etcd: exclude stopping resources from active count
|
||||
- podman-etcd: add container crash detection with coordinated recovery
|
||||
|
||||
Resolves: RHEL-127891, RHEL-126087
|
||||
Resolves: RHEL-127891
|
||||
|
||||
* Mon Nov 10 2025 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-96
|
||||
- storage_mon: fix handling of 4k block devices
|
||||
|
||||
Loading…
Reference in New Issue
Block a user