Accepting request 1159180 from home:gsu:branches:network:ha-clustering:Factory
- drbd failover timeout because of "fence-peer helper broken" (bsc#1219263) * bsc-1219263_crm-fence-peer.9.sh-fix-parsing-in_ccm-crmd-fields-o.patch * bsc-1219263_crm-fence-peer.9.sh-use-join-of-node_state-to-judge-.patch OBS-URL: https://build.opensuse.org/request/show/1159180 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd-utils?expand=0&rev=138
This commit is contained in:
parent
0b1194e5ce
commit
e0172efba7
@ -0,0 +1,64 @@
|
||||
From 6d5cb4c97031f28ae70406145aa437b3107246e6 Mon Sep 17 00:00:00 2001
|
||||
From: Su Yue <glass.su@suse.com>
|
||||
Date: Sun, 3 Mar 2024 16:36:54 +0800
|
||||
Subject: [PATCH 1/2] crm-fence-peer.9.sh: fix parsing in_ccm crmd fields of
|
||||
node_state with Pacemaker 2.1.7
|
||||
|
||||
If pacemaker version < 2.1.7, in_ccm of node_state is "true" or "false"
|
||||
and crmd is "online" or "offline".
|
||||
|
||||
pacemaker 2.1.7 changed the two fields into timestamps.
|
||||
For in_ccm, the value is timestamp since when node has been a cluster
|
||||
member("true"). A value 0 of means the node is not a cluster member("false").
|
||||
For crmd, the value is timestamp since when peer has been online in
|
||||
CPG("online"). A value 0 means the peer is offline in CPG("offline").
|
||||
|
||||
The original code doesn't handle these fields in timestamp format.
|
||||
Since there are many comprare of strings in context, converting in_ccm and crmd
|
||||
from timestamps/0 to old strings is simpler and clearer.
|
||||
|
||||
Link: https://github.com/ClusterLabs/pacemaker/blob/Pacemaker-2.1.7/lib/pengine/unpack.c#L1581
|
||||
Signed-off-by: Su Yue <glass.su@suse.com>
|
||||
---
|
||||
scripts/crm-fence-peer.9.sh | 25 +++++++++++++++++++++++++
|
||||
1 file changed, 25 insertions(+)
|
||||
|
||||
diff --git a/scripts/crm-fence-peer.9.sh b/scripts/crm-fence-peer.9.sh
|
||||
index 44da6516bf3f..a3353a7354a6 100755
|
||||
--- a/scripts/crm-fence-peer.9.sh
|
||||
+++ b/scripts/crm-fence-peer.9.sh
|
||||
@@ -888,6 +888,31 @@ guess_if_pacemaker_will_fence()
|
||||
esac
|
||||
done
|
||||
|
||||
+ # Copied from pacemaker-2.1.7:lib/pengine/unpack.c:
|
||||
+ # Since crm_feature_set 3.18.0 (pacemaker-2.1.7):
|
||||
+ #
|
||||
+ # - in_ccm ::= <timestamp>|0
|
||||
+ # Since when node has been a cluster member. A value 0 of means the
|
||||
+ # node is not a cluster member.
|
||||
+ # - crmd ::= <timestamp>|0
|
||||
+ # Since when peer has been online in CPG. A value 0 means the peer
|
||||
+ # is offline in CPG.
|
||||
+ if [[ $in_ccm =~ ^[0-9]+$ ]]; then
|
||||
+ if [[ $in_ccm = "0" ]]; then
|
||||
+ in_ccm="false"
|
||||
+ else
|
||||
+ in_ccm="true"
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
+ if [[ $crmd =~ ^[0-9]+$ ]]; then
|
||||
+ if [[ $crmd = "0" ]]; then
|
||||
+ crmd="offline"
|
||||
+ else
|
||||
+ crmd="online"
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
# if it is not enabled, no point in waiting for it.
|
||||
if ! $stonith_enabled ; then
|
||||
# "normalize" the rest of the logic
|
||||
--
|
||||
2.44.0
|
||||
|
@ -0,0 +1,30 @@
|
||||
From 922e6702cb7a089102f4843b2994ef0749c41573 Mon Sep 17 00:00:00 2001
|
||||
From: Su Yue <glass.su@suse.com>
|
||||
Date: Sun, 3 Mar 2024 16:56:38 +0800
|
||||
Subject: [PATCH 2/2] crm-fence-peer.9.sh: use join of node_state to judge
|
||||
whether node is banned
|
||||
|
||||
crmd in node_state can't be "banned". join should be used instead
|
||||
of crmd.
|
||||
|
||||
Signed-off-by: Su Yue <glass.su@suse.com>
|
||||
---
|
||||
scripts/crm-fence-peer.9.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scripts/crm-fence-peer.9.sh b/scripts/crm-fence-peer.9.sh
|
||||
index a3353a7354a6..b326a1656c15 100755
|
||||
--- a/scripts/crm-fence-peer.9.sh
|
||||
+++ b/scripts/crm-fence-peer.9.sh
|
||||
@@ -934,7 +934,7 @@ guess_if_pacemaker_will_fence()
|
||||
|
||||
# for further inspiration, see pacemaker:lib/pengine/unpack.c, determine_online_status_fencing()
|
||||
[[ -z $in_ccm ]] && will_fence=true
|
||||
- [[ $crmd = "banned" ]] && will_fence=true
|
||||
+ [[ $join = "banned" ]] && will_fence=true
|
||||
if [[ ${expected-down} = "down" && $in_ccm = "false" && $crmd != "online" ]]; then
|
||||
: "pacemaker considers this as clean down"
|
||||
elif [[ $in_ccm = false ]] || [[ $crmd != "online" ]]; then
|
||||
--
|
||||
2.44.0
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 18 11:21:52 UTC 2024 - Glass Su <glass.su@suse.com>
|
||||
|
||||
- drbd failover timeout because of "fence-peer helper broken" (bsc#1219263)
|
||||
* bsc-1219263_crm-fence-peer.9.sh-fix-parsing-in_ccm-crmd-fields-o.patch
|
||||
* bsc-1219263_crm-fence-peer.9.sh-use-join-of-node_state-to-judge-.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 26 07:51:12 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package drbd-utils
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -54,6 +54,8 @@ Patch1003: fence-after-pacemaker-down.patch
|
||||
Patch1004: bsc-1032142_Disable-quorum-in-default-configuration.patch
|
||||
Patch1005: move_fencing_from_disk_to_net_in_example.patch
|
||||
Patch1006: pie-fix.patch
|
||||
Patch1007: bsc-1219263_crm-fence-peer.9.sh-fix-parsing-in_ccm-crmd-fields-o.patch
|
||||
Patch1008: bsc-1219263_crm-fence-peer.9.sh-use-join-of-node_state-to-judge-.patch
|
||||
Patch1099: rpmlint-build-error.patch
|
||||
#############################################
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user