Compare commits
No commits in common. "factory" and "devel" have entirely different histories.
@ -0,0 +1,35 @@
|
||||
From e64b8b13435f99ba21a74caeebeb996f76dfd43c Mon Sep 17 00:00:00 2001
|
||||
From: Joel Colledge <joel.colledge@linbit.com>
|
||||
Date: Wed, 26 Jul 2023 10:14:54 +0200
|
||||
Subject: [PATCH] drbdadm,v9: do not segfault when re-configuring proxy with no
|
||||
path
|
||||
|
||||
This prevents a segfault when a resource has a connection with no path,
|
||||
and "adjust" attempts to re-configure proxy.
|
||||
|
||||
This could occur as follows, when drbd-proxy-ctl is not on $PATH:
|
||||
* Bring resource and connection up without proxy.
|
||||
* Add proxy configuration to res file.
|
||||
* "drbdadm adjust <res>" - this causes the existing path to be deleted,
|
||||
but no new path is created because drbd-proxy-ctl cannot be executed.
|
||||
* "drbdadm adjust <res>" - segfault.
|
||||
---
|
||||
user/v9/drbdadm_adjust.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/user/v9/drbdadm_adjust.c b/user/v9/drbdadm_adjust.c
|
||||
index 83df624c4e46..f3d321b9ec65 100644
|
||||
--- a/user/v9/drbdadm_adjust.c
|
||||
+++ b/user/v9/drbdadm_adjust.c
|
||||
@@ -390,7 +390,7 @@ static int proxy_reconf(const struct cfg_ctx *ctx, struct connection *running_co
|
||||
goto redo_whole_conn;
|
||||
|
||||
running_path = STAILQ_FIRST(&running_conn->paths); /* multiple paths via proxy, later! */
|
||||
- if (!running_path->my_proxy)
|
||||
+ if (!running_path || !running_path->my_proxy)
|
||||
goto redo_whole_conn;
|
||||
|
||||
if (running_path->proxy_conn_is_down)
|
||||
--
|
||||
2.35.3
|
||||
|
45
0002-user-drbrdmon-add-missing-stdint.h-includes.patch
Normal file
45
0002-user-drbrdmon-add-missing-stdint.h-includes.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From feebd378195cf18b06f9fa209586af0c6d32ddb8 Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
Date: Thu, 27 Jul 2023 06:30:25 +0100
|
||||
Subject: [PATCH] user: drbrdmon: add missing <stdint.h> includes
|
||||
|
||||
GCC 13 drops some transitive includes within libstdc++.
|
||||
|
||||
Explicitly include <stdint.h> for uint32_t etc.
|
||||
|
||||
Note that using <stdint.h> deliberately because we're not using std::-prefixed
|
||||
types.
|
||||
|
||||
Signed-off-by: Sam James <sam@gentoo.org>
|
||||
---
|
||||
user/drbdmon/DrbdMonConsts.h | 1 +
|
||||
user/drbdmon/terminal/DisplayId.h | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/user/drbdmon/DrbdMonConsts.h b/user/drbdmon/DrbdMonConsts.h
|
||||
index 73d25f28fbeb..f962d0d38a6d 100644
|
||||
--- a/user/drbdmon/DrbdMonConsts.h
|
||||
+++ b/user/drbdmon/DrbdMonConsts.h
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef DRBDMONCONSTS_H
|
||||
#define DRBDMONCONSTS_H
|
||||
|
||||
+#include <stdint.h>
|
||||
#include <string>
|
||||
|
||||
class DrbdMonConsts
|
||||
diff --git a/user/drbdmon/terminal/DisplayId.h b/user/drbdmon/terminal/DisplayId.h
|
||||
index 40d3de488fd9..fa4b744438d4 100644
|
||||
--- a/user/drbdmon/terminal/DisplayId.h
|
||||
+++ b/user/drbdmon/terminal/DisplayId.h
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef DISPLAYID_H
|
||||
#define DISPLAYID_H
|
||||
|
||||
+#include <stdint.h>
|
||||
#include <string>
|
||||
|
||||
class DisplayId
|
||||
--
|
||||
2.35.3
|
||||
|
1693
0003-Introduce-default_types.h-header.patch
Normal file
1693
0003-Introduce-default_types.h-header.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
@ -0,0 +1,35 @@
|
||||
From 4efed473e70c91487f7834f8bf536970e9389f3f Mon Sep 17 00:00:00 2001
|
||||
From: Su Yue <glass.su@suse.com>
|
||||
Date: Sun, 7 Jul 2024 16:05:42 +0800
|
||||
Subject: [PATCH 2/3] drbd.ocf: update regex of sed for new output from
|
||||
crm_resource
|
||||
|
||||
Since Pacemaker-2.1.0
|
||||
crm_resource --resource "$OCF_RESOURCE_INSTANCE" --locate outputs
|
||||
'resource promotable-clone is running on: cluster02 Promoted'
|
||||
was
|
||||
'resource promotable-clone is running on: cluster02 Master'.
|
||||
|
||||
So update the regular expression.
|
||||
|
||||
Signed-off-by: Su Yue <glass.su@suse.com>
|
||||
---
|
||||
scripts/drbd.ocf | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scripts/drbd.ocf b/scripts/drbd.ocf
|
||||
index 133aff737455..bbe25f38edda 100755
|
||||
--- a/scripts/drbd.ocf
|
||||
+++ b/scripts/drbd.ocf
|
||||
@@ -999,7 +999,7 @@ crm_resource_locate_master()
|
||||
called_crm_resource_locate=true
|
||||
DRBD_PRIMARY_PEER_according_to_pcmk=$(
|
||||
crm_resource --resource "$OCF_RESOURCE_INSTANCE" --locate 2>/dev/null |
|
||||
- sed -ne 's/^.*is running on: \([^ ]*\) Master.*$/\1/p' |
|
||||
+ sed -ne 's/^.*is running on: \([^ ]*\) \(Master\|Promoted\).*$/\1/p' |
|
||||
grep -vix -m1 -e "$HOSTNAME")
|
||||
}
|
||||
|
||||
--
|
||||
2.45.2
|
||||
|
BIN
drbd-utils-9.25.0.tar.gz
(Stored with Git LFS)
Normal file
BIN
drbd-utils-9.25.0.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user