!49 [sync] PR-47: update to 4.15.1 and fix build error
From: @openeuler-sync-bot Reviewed-by: @xiangbudaomz Signed-off-by: @xiangbudaomz
This commit is contained in:
commit
bf604d7cb9
@ -1,49 +0,0 @@
|
||||
From 65a066cf9066390db65c4875e21c4c391793b9ae Mon Sep 17 00:00:00 2001
|
||||
From: Arslan Ahmad <arslan.ahmad97@googlemail.com>
|
||||
Date: Tue, 16 Jan 2024 09:11:17 +0530
|
||||
Subject: [PATCH] Avoid false positive for VG activation
|
||||
|
||||
When lvm.conf file has `volume_list` parameter configured and the
|
||||
cluster is managing the shared storage using `system_id_source`,
|
||||
then the activation of the LV fails to happen. However it is
|
||||
reported as a success.
|
||||
|
||||
The fixes will avoid starting of `LVM-activate` resource when
|
||||
the cluster is configured with both `system_id_source` and
|
||||
`volume_list`.
|
||||
|
||||
Signed-off-by: Arslan Ahmad <arslan.ahmad97@googlemail.com>
|
||||
---
|
||||
heartbeat/LVM-activate | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/heartbeat/LVM-activate b/heartbeat/LVM-activate
|
||||
index f6f24a3b..3858ed8d 100755
|
||||
--- a/heartbeat/LVM-activate
|
||||
+++ b/heartbeat/LVM-activate
|
||||
@@ -448,6 +448,10 @@ systemid_check()
|
||||
{
|
||||
# system_id_source is set in lvm.conf
|
||||
source=$(lvmconfig 'global/system_id_source' 2>/dev/null | cut -d"=" -f2)
|
||||
+
|
||||
+ # Is volume_list set in lvm.conf
|
||||
+ vol_list=$(lvmconfig 'activation/volume_list' 2>/dev/null | cut -d"=" -f2)
|
||||
+
|
||||
if [ "$source" = "" ] || [ "$source" = "none" ]; then
|
||||
ocf_exit_reason "system_id_source in lvm.conf is not set correctly!"
|
||||
exit $OCF_ERR_ARGS
|
||||
@@ -458,6 +462,11 @@ systemid_check()
|
||||
exit $OCF_ERR_ARGS
|
||||
fi
|
||||
|
||||
+ if [ -n "$source" ] && [ -n "$vol_list" ]; then
|
||||
+ ocf_exit_reason "Both system_id_source & volume_list cannot be defined!"
|
||||
+ exit $OCF_ERR_ARGS
|
||||
+ fi
|
||||
+
|
||||
return $OCF_SUCCESS
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1,58 +0,0 @@
|
||||
From c070a9a4f1d0e9215a72a9481799a4b8a069be10 Mon Sep 17 00:00:00 2001
|
||||
From: Reid Wahl <nrwahl@protonmail.com>
|
||||
Date: Thu, 7 Mar 2024 12:24:36 -0800
|
||||
Subject: [PATCH] Doc: Delay: Drop old comments
|
||||
|
||||
stopdelay and mondelay do not default to startdelay. Should have been
|
||||
done with fe8a807d.
|
||||
|
||||
Also remove comments that are redundant with the metadata, and remove
|
||||
descriptions of this as a "test" resource. This has valid uses in some
|
||||
production environments.
|
||||
|
||||
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
|
||||
---
|
||||
heartbeat/Delay | 19 +++----------------
|
||||
1 file changed, 3 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/heartbeat/Delay b/heartbeat/Delay
|
||||
index 5aa8f460..c96da0e0 100755
|
||||
--- a/heartbeat/Delay
|
||||
+++ b/heartbeat/Delay
|
||||
@@ -4,22 +4,9 @@
|
||||
# Support: users@clusterlabs.org
|
||||
# License: GNU General Public License (GPL)
|
||||
#
|
||||
-# This script is a test resource for introducing delay.
|
||||
+# This script is a resource for introducing a delay.
|
||||
#
|
||||
-# usage: $0 {start|stop|status|monitor|meta-data}
|
||||
-#
|
||||
-# OCF parameters are as below:
|
||||
-# OCF_RESKEY_startdelay
|
||||
-# OCF_RESKEY_stopdelay
|
||||
-# OCF_RESKEY_mondelay
|
||||
-#
|
||||
-#
|
||||
-# OCF_RESKEY_startdelay defaults to 20 (seconds)
|
||||
-# OCF_RESKEY_stopdelay defaults to $OCF_RESKEY_startdelay
|
||||
-# OCF_RESKEY_mondelay defaults to $OCF_RESKEY_startdelay
|
||||
-#
|
||||
-#
|
||||
-# This is really a test resource script.
|
||||
+# usage: $0 {start|stop|status|monitor|meta-data}
|
||||
#
|
||||
|
||||
#######################################################################
|
||||
@@ -54,7 +41,7 @@ meta_data() {
|
||||
<version>1.0</version>
|
||||
|
||||
<longdesc lang="en">
|
||||
-This script is a test resource for introducing delay.
|
||||
+This script is a resource for introducing a delay.
|
||||
</longdesc>
|
||||
<shortdesc lang="en">Waits for a defined timespan</shortdesc>
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
From 09560af2a5cb3db08fe428906c0af76bf09594f0 Mon Sep 17 00:00:00 2001
|
||||
From: Christine Caulfield <ccaulfie@redhat.com>
|
||||
Date: Mon, 29 Jan 2024 08:41:23 +0000
|
||||
Subject: [PATCH] Don't build with -ansi by default
|
||||
|
||||
-ansi restricts the code to C90 standard which can break some
|
||||
included headers (specifically seen on freebsd-devel), so don't
|
||||
make it the default.
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 67b9ddd3..e05de3a0 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -186,7 +186,7 @@ AC_SUBST(PKGNAME)
|
||||
|
||||
AC_ARG_ENABLE([ansi],
|
||||
[ --enable-ansi force GCC to compile to ANSI/ANSI standard for older compilers.
|
||||
- [default=yes]])
|
||||
+ [default=no]])
|
||||
|
||||
AC_ARG_ENABLE([fatal-warnings],
|
||||
[ --enable-fatal-warnings very pedantic and fatal warnings for gcc
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From 51d252f46df079460eb21d282e2390f0ad9c5ff8 Mon Sep 17 00:00:00 2001
|
||||
From: Lorenzo Garuti <garuti.lorenzo@gmail.com>
|
||||
Date: Wed, 25 Oct 2023 09:51:14 +0000
|
||||
Subject: [PATCH] Fix PRIMARY_IFACE variable. In some cases ip returns two
|
||||
lines
|
||||
|
||||
---
|
||||
heartbeat/ocivip | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/heartbeat/ocivip b/heartbeat/ocivip
|
||||
index 053646dc..f146807d 100755
|
||||
--- a/heartbeat/ocivip
|
||||
+++ b/heartbeat/ocivip
|
||||
@@ -221,7 +221,7 @@ SECONDARY_PRIVATE_IP="${OCF_RESKEY_secondary_private_ip}"
|
||||
CIDR_NETMASK="${OCF_RESKEY_cidr_netmask}"
|
||||
INTERFACE_ALIAS="${OCF_RESKEY_interface_alias}"
|
||||
VNIC_ID="$(curl -s -H "Authorization: Bearer Oracle" -L http://169.254.169.254/opc/v2/vnics/ | jq -r '.[0].vnicId')"
|
||||
-PRIMARY_IFACE=$(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)')
|
||||
+PRIMARY_IFACE=$(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)' | head -n1)
|
||||
|
||||
case $__OCF_ACTION in
|
||||
start)
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
From ed418237891d4a5003ba3513e417d34fa86bbb52 Mon Sep 17 00:00:00 2001
|
||||
From: Ryan Ronnander <rronnander@linbit.com>
|
||||
Date: Fri, 23 Feb 2024 10:00:28 -0800
|
||||
Subject: [PATCH] Fix docker RA behavior when Docker isn't running
|
||||
|
||||
---
|
||||
heartbeat/docker | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/heartbeat/docker b/heartbeat/docker
|
||||
index 2adcadee..50523db9 100755
|
||||
--- a/heartbeat/docker
|
||||
+++ b/heartbeat/docker
|
||||
@@ -293,8 +293,8 @@ docker_simple_status()
|
||||
VERSION_OUT=$(docker version)
|
||||
version_ret=$?
|
||||
if [ $version_ret -eq 1 ]; then
|
||||
- ocf_exit_reason "Docker service is in error state while checking for ${CONTAINER}, based on image, ${OCF_RESKEY_image}: ${VERSION_OUT}"
|
||||
- return $OCF_ERR_GENERIC
|
||||
+ ocf_log err "Docker service is not running or in error state while checking for ${CONTAINER}, based on image, ${OCF_RESKEY_image}: ${VERSION_OUT}"
|
||||
+ return $OCF_NOT_RUNNING
|
||||
fi
|
||||
|
||||
container_exists
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@ -1,59 +0,0 @@
|
||||
From 2d5eaf0d97acb0dda6b5f872653ad66dc1dc8c1d Mon Sep 17 00:00:00 2001
|
||||
From: Reid Wahl <nrwahl@protonmail.com>
|
||||
Date: Tue, 26 Mar 2024 20:43:19 -0700
|
||||
Subject: [PATCH] Fix: openstack-info: Ensure no newlines in openstack_ports
|
||||
|
||||
This makes the openstack_ports variable match the format specified in
|
||||
the openstack-info metadata (see longdesc). It should be a
|
||||
comma-separated list of "SUBNET_ID:PORT_ID". It should not be
|
||||
|
||||
SUBNET_A
|
||||
SUBNET_B:PORT_1,SUBNET_C
|
||||
SUBNET_D:PORT_2,
|
||||
|
||||
But rather
|
||||
|
||||
SUBNET_A:PORT1,SUBNET_B:PORT1,SUBNET_C:PORT2,SUBNET_D:PORT2
|
||||
|
||||
The newlines caused parsing issues in an experimental version of
|
||||
Pacemaker. Pacemaker is being fixed
|
||||
(https://github.com/ClusterLabs/pacemaker/pull/3395), but this
|
||||
illustrated an issue in openstack-info that makes parsing rather
|
||||
precarious.
|
||||
|
||||
openstack-virtual-ip is capable of parsing either format without changes
|
||||
on a stable release of Pacemaker.
|
||||
|
||||
However, looking ahead, it should be updated to use
|
||||
"attrd_updater --output-as=xml" to query the attribute, as the XML
|
||||
output is much easier and more reliable to parse. (It should check the
|
||||
Pacemaker feature set to determine whether XML output is available for
|
||||
attrd_updater.)
|
||||
|
||||
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
|
||||
---
|
||||
heartbeat/openstack-info.in | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/heartbeat/openstack-info.in b/heartbeat/openstack-info.in
|
||||
index 6502f1df..876e833c 100755
|
||||
--- a/heartbeat/openstack-info.in
|
||||
+++ b/heartbeat/openstack-info.in
|
||||
@@ -164,10 +164,12 @@ OSInfoStats() {
|
||||
--format json \
|
||||
--column fixed_ips \
|
||||
${port_id}")
|
||||
- subnet_id=$(echo "$subnet_result" |
|
||||
+ subnet_ids=$(echo "$subnet_result" |
|
||||
grep -P '\"subnet_id\": \".*\",$' |
|
||||
grep -P -o '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}')
|
||||
- value="${value}${subnet_id}:${port_id},"
|
||||
+ for subnet_id in $subnet_ids; do
|
||||
+ value="${value}${subnet_id}:${port_id},"
|
||||
+ done
|
||||
done
|
||||
value=${value%,}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1,33 +0,0 @@
|
||||
From a0b09687b6b26331fe6ec20915a122dcb7034aaa Mon Sep 17 00:00:00 2001
|
||||
From: Reid Wahl <nrwahl@protonmail.com>
|
||||
Date: Sun, 10 Dec 2023 12:11:41 -0800
|
||||
Subject: [PATCH] Low: IPaddr2: Remove stray backslash
|
||||
|
||||
Fixes this warning (which gets logged on every recurring monitor for a
|
||||
Pacemaker resource):
|
||||
|
||||
$ OCF_ROOT=/usr/lib/ocf OCF_RESKEY_ip=192.168.22.41 \
|
||||
/usr/lib/ocf/resource.d/heartbeat/IPaddr2 monitor
|
||||
grep: warning: stray \ before white space
|
||||
|
||||
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
|
||||
---
|
||||
heartbeat/IPaddr2 | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2
|
||||
index 97a7431a..5f30b8f9 100755
|
||||
--- a/heartbeat/IPaddr2
|
||||
+++ b/heartbeat/IPaddr2
|
||||
@@ -624,7 +624,7 @@ find_interface() {
|
||||
# List interfaces but exclude FreeS/WAN ipsecN virtual interfaces
|
||||
#
|
||||
local iface="`$IP2UTIL -o -f $FAMILY addr show \
|
||||
- | grep "\ $ipaddr/$netmask" \
|
||||
+ | grep " $ipaddr/$netmask" \
|
||||
| cut -d ' ' -f2 \
|
||||
| grep -v '^ipsec[0-9][0-9]*$'`"
|
||||
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@ -1,113 +0,0 @@
|
||||
From f97fee4af31822c40c318562d8cc707ced0aa11c Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Fri, 22 Mar 2024 09:09:56 +0100
|
||||
Subject: [PATCH] all agents: remove -S state/status that are either ignored,
|
||||
or give an error message in newer versions of Pacemaker
|
||||
|
||||
---
|
||||
heartbeat/SysInfo.in | 2 +-
|
||||
heartbeat/lxd-info.in | 4 ++--
|
||||
heartbeat/machine-info.in | 4 ++--
|
||||
heartbeat/openstack-floating-ip | 4 ++--
|
||||
heartbeat/openstack-virtual-ip | 4 ++--
|
||||
5 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/heartbeat/SysInfo.in b/heartbeat/SysInfo.in
|
||||
index c57b7b66..8a268d76 100644
|
||||
--- a/heartbeat/SysInfo.in
|
||||
+++ b/heartbeat/SysInfo.in
|
||||
@@ -119,7 +119,7 @@ UpdateStat() {
|
||||
name=$1; shift
|
||||
value="$*"
|
||||
echo -e "$name:\t$value"
|
||||
- ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -S status -n $name -v "$value"
|
||||
+ ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -n $name -v "$value"
|
||||
}
|
||||
|
||||
SysInfoStats() {
|
||||
diff --git a/heartbeat/lxd-info.in b/heartbeat/lxd-info.in
|
||||
index f9fb44ac..88b15e57 100644
|
||||
--- a/heartbeat/lxd-info.in
|
||||
+++ b/heartbeat/lxd-info.in
|
||||
@@ -89,7 +89,7 @@ END
|
||||
LXDInfoStats() {
|
||||
value=$(lxc list|grep -ci RUNNING)
|
||||
echo -e "lxd_containers:\t$value"
|
||||
- ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -S status -n lxd_containers -v $value
|
||||
+ ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -n lxd_containers -v $value
|
||||
}
|
||||
|
||||
LXDInfo_usage() {
|
||||
@@ -108,7 +108,7 @@ LXDInfo_start() {
|
||||
|
||||
LXDInfo_stop() {
|
||||
rm -f $OCF_RESKEY_pidfile
|
||||
- ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -D -S state -n lxd_containers
|
||||
+ ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -D -n lxd_containers
|
||||
exit $OCF_SUCCESS
|
||||
}
|
||||
|
||||
diff --git a/heartbeat/machine-info.in b/heartbeat/machine-info.in
|
||||
index bfa7ce5f..6bd328aa 100644
|
||||
--- a/heartbeat/machine-info.in
|
||||
+++ b/heartbeat/machine-info.in
|
||||
@@ -90,7 +90,7 @@ END
|
||||
MachineInfoStats() {
|
||||
value=$(machinectl|awk '/machines listed/ {print $1}')
|
||||
echo -e "machines:\t$value"
|
||||
- ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -S status -n machines -v $value
|
||||
+ ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -n machines -v $value
|
||||
}
|
||||
|
||||
MachineInfo_usage() {
|
||||
@@ -109,7 +109,7 @@ MachineInfo_start() {
|
||||
|
||||
MachineInfo_stop() {
|
||||
rm -f $OCF_RESKEY_pidfile
|
||||
- ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -D -S state -n machines
|
||||
+ ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -D -n machines
|
||||
exit $OCF_SUCCESS
|
||||
}
|
||||
|
||||
diff --git a/heartbeat/openstack-floating-ip b/heartbeat/openstack-floating-ip
|
||||
index 7317f19a..a7c07284 100755
|
||||
--- a/heartbeat/openstack-floating-ip
|
||||
+++ b/heartbeat/openstack-floating-ip
|
||||
@@ -143,13 +143,13 @@ osflip_monitor() {
|
||||
for port in $node_port_ids ; do
|
||||
if echo "$result" | grep -q $port ; then
|
||||
floating_ip=$(echo "$result" | awk '/floating_ip_address/ {print $2}')
|
||||
- ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -S status -n openstack_floating_ip -v $floating_ip
|
||||
+ ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -n openstack_floating_ip -v $floating_ip
|
||||
|
||||
return $OCF_SUCCESS
|
||||
fi
|
||||
done
|
||||
|
||||
- ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -D -S state -n openstack_floating_ip
|
||||
+ ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -D -n openstack_floating_ip
|
||||
ocf_log warn "$OCF_RESKEY_ip_id is not attached to any fixed address"
|
||||
return $OCF_NOT_RUNNING
|
||||
}
|
||||
diff --git a/heartbeat/openstack-virtual-ip b/heartbeat/openstack-virtual-ip
|
||||
index 361357d5..e54926a0 100755
|
||||
--- a/heartbeat/openstack-virtual-ip
|
||||
+++ b/heartbeat/openstack-virtual-ip
|
||||
@@ -137,12 +137,12 @@ osvip_monitor() {
|
||||
--column allowed_address_pairs \
|
||||
${node_port_id}")
|
||||
if echo "$result" | grep -q "$OCF_RESKEY_ip"; then
|
||||
- ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -S status -n openstack_virtual_ip -v $OCF_RESKEY_ip
|
||||
+ ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -n openstack_virtual_ip -v $OCF_RESKEY_ip
|
||||
|
||||
return $OCF_SUCCESS
|
||||
fi
|
||||
|
||||
- ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -D -S state -n openstack_virtual_ip
|
||||
+ ${HA_SBIN_DIR}/attrd_updater ${OCF_RESKEY_delay} -D -n openstack_virtual_ip
|
||||
ocf_log warn "$OCF_RESKEY_ip is not attached to any fixed address"
|
||||
return $OCF_NOT_RUNNING
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
From 60366e7a877919b7767736cbbb7850588f461490 Mon Sep 17 00:00:00 2001
|
||||
From: caodongxia <315816521@qq.com>
|
||||
Date: Wed, 25 Aug 2021 16:12:22 +0800
|
||||
Subject: [PATCH] fix failed to parse pid from pid-file
|
||||
|
||||
---
|
||||
ldirectord/systemd/ldirectord.service.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/ldirectord/systemd/ldirectord.service.in b/ldirectord/systemd/ldirectord.service.in
|
||||
index 191f62a..aafc2dc 100644
|
||||
--- a/ldirectord/systemd/ldirectord.service.in
|
||||
+++ b/ldirectord/systemd/ldirectord.service.in
|
||||
@@ -4,6 +4,7 @@ Documentation=man:ldirectord(8)
|
||||
|
||||
[Service]
|
||||
ExecStart=@sbindir@/ldirectord start
|
||||
+ExecStartPost=/usr/bin/sleep 0.1
|
||||
ExecStartPost=/usr/bin/touch /var/lock/subsys/ldirectord
|
||||
ExecStop=@sbindir@/ldirectord stop
|
||||
ExecStopPost=@RM@ -f /var/lock/subsys/ldirectord
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,55 +0,0 @@
|
||||
From cebb02175a980bd74d84beeef336dbcba73df19f Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Thu, 22 Feb 2024 16:42:01 +0800
|
||||
Subject: [PATCH] fix handler out of scope leak, unitialized value and check
|
||||
that netmaskbits != EOS
|
||||
|
||||
---
|
||||
tools/findif.c | 2 +-
|
||||
tools/storage_mon.c | 10 ++++++++--
|
||||
2 files changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tools/findif.c b/tools/findif.c
|
||||
index a25395f..ab108a3 100644
|
||||
--- a/tools/findif.c
|
||||
+++ b/tools/findif.c
|
||||
@@ -669,7 +669,7 @@ main(int argc, char ** argv) {
|
||||
}
|
||||
}
|
||||
|
||||
- if (netmaskbits) {
|
||||
+ if (netmaskbits != NULL && *netmaskbits != EOS) {
|
||||
best_netmask = netmask;
|
||||
}else if (best_netmask == 0L) {
|
||||
/*
|
||||
diff --git a/tools/storage_mon.c b/tools/storage_mon.c
|
||||
index 1aae29e..3484ca6 100644
|
||||
--- a/tools/storage_mon.c
|
||||
+++ b/tools/storage_mon.c
|
||||
@@ -382,7 +382,9 @@ static int write_pid_file(const char *pidfile)
|
||||
syslog(LOG_ERR, "Failed to write '%s' to %s: %s", pid, pidfile, strerror(errno));
|
||||
goto done;
|
||||
}
|
||||
- close(fd);
|
||||
+ if (fd != -1) {
|
||||
+ close(fd);
|
||||
+ }
|
||||
rc = 0;
|
||||
done:
|
||||
if (pid != NULL) {
|
||||
@@ -683,7 +685,11 @@ storage_mon_client(void)
|
||||
/* greater than 0 : monitoring error. */
|
||||
/* -1 : communication system error. */
|
||||
/* -2 : Not all checks completed for first device in daemon mode. */
|
||||
- rc = atoi(response.message);
|
||||
+ if (strnlen(response.message, 1)) {
|
||||
+ rc = atoi(response.message);
|
||||
+ } else {
|
||||
+ rc = -1;
|
||||
+ }
|
||||
|
||||
syslog(LOG_DEBUG, "daemon response[%d]: %s \n", response.hdr.id, response.message);
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
From 995641ec973ac2791eceeddc84c21cfc20cb28d5 Mon Sep 17 00:00:00 2001
|
||||
From: bixiaoyan <bixiaoyan@kylinos.cn>
|
||||
Date: Tue, 7 Nov 2023 15:08:31 +0800
|
||||
Subject: [PATCH] fix loopback handling
|
||||
|
||||
---
|
||||
heartbeat/findif.sh | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/heartbeat/findif.sh b/heartbeat/findif.sh
|
||||
index 5f1c19e..7c766e6 100644
|
||||
--- a/heartbeat/findif.sh
|
||||
+++ b/heartbeat/findif.sh
|
||||
@@ -29,10 +29,10 @@ prefixcheck() {
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
-getnetworkinfo()
|
||||
+getloopbackinfo()
|
||||
{
|
||||
local line netinfo
|
||||
- ip -o -f inet route list match $OCF_RESKEY_ip scope host | (while read line;
|
||||
+ ip -o -f inet route list match $OCF_RESKEY_ip table local scope host | (while read line;
|
||||
do
|
||||
netinfo=`echo $line | awk '{print $2}'`
|
||||
case $netinfo in
|
||||
@@ -222,7 +222,7 @@ findif()
|
||||
if [ $# = 0 ] ; then
|
||||
case $OCF_RESKEY_ip in
|
||||
127.*)
|
||||
- set -- `getnetworkinfo`
|
||||
+ set -- `getloopbackinfo`
|
||||
shift;;
|
||||
esac
|
||||
fi
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From cb968378959b8aa334e98daf62a1b08ef6525fb4 Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Wed, 22 Nov 2023 10:32:31 +0100
|
||||
Subject: [PATCH] storage_mon: use memset() to fix "uninitialized value"
|
||||
covscan error, as qb_ipcc_recv() will always set a message (according to
|
||||
honzaf)
|
||||
|
||||
---
|
||||
tools/storage_mon.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/tools/storage_mon.c b/tools/storage_mon.c
|
||||
index cc415e97..a9227ef9 100644
|
||||
--- a/tools/storage_mon.c
|
||||
+++ b/tools/storage_mon.c
|
||||
@@ -655,6 +655,7 @@ storage_mon_client(void)
|
||||
int32_t rc;
|
||||
|
||||
|
||||
+ memset(&response, 0, sizeof(response));
|
||||
snprintf(ipcs_name, SMON_MAX_IPCSNAME, "storage_mon_%s", attrname);
|
||||
conn = qb_ipcc_connect(ipcs_name, 0);
|
||||
if (conn == NULL) {
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1,57 +0,0 @@
|
||||
From a346aae4bee8f53354fa001141057a1c88743ef3 Mon Sep 17 00:00:00 2001
|
||||
From: Lars Ellenberg <lars.ellenberg@linbit.com>
|
||||
Date: Tue, 26 Mar 2024 17:43:14 +0100
|
||||
Subject: [PATCH] nfsserver: fix "server scope" functionality for both
|
||||
potentially other dropins AND multiple ExecStart
|
||||
|
||||
986ebe18 (nfsserver: Fix NFSv4 lock failover: set NFS Server Scope (#1688), 2021-10-13)
|
||||
|
||||
Prefixes all `ExecStart=.*` with an unshare --uts.
|
||||
It did not expect an existing "empty, resetting" `ExecStart=`, though,
|
||||
and changed that as well. The attempt to fix that with
|
||||
|
||||
806e3fe9 (nfsserver: fix "server scope" functionality to live with additional drop-in files, 2023-02-15)
|
||||
|
||||
it wrong though: it only fixes the _last_ ExecStart found (`|tail -1`).
|
||||
There may be more than one ExecStart (even though arguable some of them should be ExecStartPost).
|
||||
|
||||
Without the "only last line", it would be a valid fix,
|
||||
though it would unnecessarily list irrelevant ExecStart lines as well.
|
||||
|
||||
My attempt to fix the fix:
|
||||
Find the set of `ExecStart=...` lines after the last reset (`ExecStart=`), if any.
|
||||
Edit in the "unshare uts" prefix into all of those lines.
|
||||
|
||||
(we could also patch only the line containing rpc.nfsd,
|
||||
but I'm sure some distro will find creative ways to break our assumptions again)
|
||||
---
|
||||
heartbeat/nfsserver | 13 +++++++++++--
|
||||
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/heartbeat/nfsserver b/heartbeat/nfsserver
|
||||
index 8838195a..5793d7a7 100755
|
||||
--- a/heartbeat/nfsserver
|
||||
+++ b/heartbeat/nfsserver
|
||||
@@ -711,8 +711,17 @@ inject_unshare_uts_name_into_systemd_units ()
|
||||
test -d "$dir" || mkdir -p "$dir"
|
||||
test -e "$dropin" && rm -f "$dropin"
|
||||
|
||||
- # NOTE: additional ExecStart= might exist in the drop-in files, eg. openSUSE
|
||||
- edited_exec_start=$(systemctl cat $svc | sed -ne "s#^ExecStart=\\([-+:!@]*\\)\\(.\+\\)#ExecStart=\\1/usr/bin/unshare --uts /bin/sh -c 'hostname \${NFS_SERVER_SCOPE}; exec \"\$@\"' -- \\2#p" | tail -1)
|
||||
+ # NOTE: multiple ExecStart may exist,
|
||||
+ # even additional `ExecStart=` to reset the list might exist in the drop-in files.
|
||||
+ # We are interested in only the "currently relevant" set of ExecStart.
|
||||
+ local unshare_uts_set_hostname='/usr/bin/unshare --uts /bin/sh -c '\''hostname ${NFS_SERVER_SCOPE}; exec "$@"'\'' -- '
|
||||
+ edited_exec_start=$(systemctl cat $svc \
|
||||
+ | sed -n \
|
||||
+ -e '/^ExecStart=/ H;' \
|
||||
+ -e '/^ExecStart=[[:space:]]*$/ {s/.*//;h};' \
|
||||
+ -e '${g;s/^\n//;p}' \
|
||||
+ | sed -e 's#^\(ExecStart=[-+:!@]*\)\(.\+\)#\1'"$unshare_uts_set_hostname"'\2#'
|
||||
+ )
|
||||
|
||||
cat > "$dropin" <<___
|
||||
[Service]
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1,57 +0,0 @@
|
||||
From 420e591baa01aca8123cfce9bff3f612a816786e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?=
|
||||
<christoph.boehmwalder@linbit.com>
|
||||
Date: Wed, 20 Mar 2024 16:42:08 +0100
|
||||
Subject: [PATCH] portblock: accept numeric protocol from iptables
|
||||
|
||||
Usually, using the "-n" flag with "iptables -L" will only enable numeric
|
||||
display for hosts and port numbers. Protocols are unaffected and are
|
||||
still shown as "tcp" or "udp", which we rely on in the portblock agent.
|
||||
|
||||
iptables version 1.8.9 ships with a regression that breaks this format,
|
||||
displaying the numeric value of the protocol instead. See this bug
|
||||
report for more: https://bugzilla.netfilter.org/show_bug.cgi?id=1729
|
||||
|
||||
The issue was fixed in the 1.8.10 release, but some distributions
|
||||
(notably, Debian Bookworm and Fedora 39) have shipped 1.8.9,
|
||||
effectively breaking the portblock agent.
|
||||
|
||||
Since both formats are now in use in the wild, we must work around this
|
||||
in the resource agent by allowing both the numeric and string
|
||||
representation of the protocol.
|
||||
---
|
||||
heartbeat/portblock | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/heartbeat/portblock b/heartbeat/portblock
|
||||
index 06fcc194..7b9f5ca3 100755
|
||||
--- a/heartbeat/portblock
|
||||
+++ b/heartbeat/portblock
|
||||
@@ -266,7 +266,14 @@ active_grep_pat()
|
||||
local src=$3
|
||||
local dst=$any
|
||||
fi
|
||||
- echo "^DROP${w}${1}${w}--${w}${src}${w}${dst}${w}multiport${w}${4}ports${w}${2}$"
|
||||
+ # iptables 1.8.9 briefly broke the output format, returning the
|
||||
+ # numeric protocol value instead of a string. Support both variants.
|
||||
+ if [ "$1" = "tcp" ]; then
|
||||
+ local prot="(tcp|6)"
|
||||
+ else
|
||||
+ local prot="(udp|17)"
|
||||
+ fi
|
||||
+ echo "^DROP${w}${prot}${w}--${w}${src}${w}${dst}${w}multiport${w}${4}ports${w}${2}$"
|
||||
}
|
||||
|
||||
#chain_isactive {udp|tcp} portno,portno ip chain
|
||||
@@ -274,7 +281,7 @@ chain_isactive()
|
||||
{
|
||||
[ "$4" = "OUTPUT" ] && ds="s" || ds="d"
|
||||
PAT=$(active_grep_pat "$1" "$2" "$3" "$ds")
|
||||
- $IPTABLES $wait -n -L "$4" | grep "$PAT" >/dev/null
|
||||
+ $IPTABLES $wait -n -L "$4" | grep -qE "$PAT"
|
||||
}
|
||||
|
||||
# netstat -tn and ss -Htn, split on whitespace and colon,
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1,56 +0,0 @@
|
||||
From c448ca01367916741662b9e6af54d5d3f189d4fa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?=
|
||||
<christoph.boehmwalder@linbit.com>
|
||||
Date: Mon, 25 Mar 2024 15:39:44 +0100
|
||||
Subject: [PATCH 1/3] portblock: remove write to tcp_tw_recycle
|
||||
|
||||
Currently, the portblock resource agent enables the
|
||||
net.ipv4.tcp_tw_recycle option before sending a tickle ACK packet.
|
||||
|
||||
This option is supposed to recycle TCP sockets that are left in the
|
||||
TIME_WAIT state. On the host that initiates the closing of a TCP
|
||||
connection, a socket will be left in this state for about 60 seconds
|
||||
before it finally gets removed (and freed up for further use). This is
|
||||
by design, and it is generally considered useful. [0]
|
||||
|
||||
The tcp_tw_recycle option is supposed to shorten the time that a socket
|
||||
spends in the TIME_WAIT state, allowing its slot to be reused more
|
||||
quickly.
|
||||
|
||||
Unfortunately, there are no hints left by the previous author about the
|
||||
rationale behind setting this option. One can only guess that they
|
||||
somehow managed to exhaust the number of TCP sockets during testing, and
|
||||
setting this option resolved that immediate issue. It is not entirely
|
||||
clear how this would happen in an actual real-world scenario, since it
|
||||
would require many switchovers in a relatively short period of time.
|
||||
|
||||
The problem is that this option has been completely broken starting from
|
||||
Linux 4.10 (since it started randomizing TCP timestamp offsets), and
|
||||
even before that for NAT connections.
|
||||
|
||||
Finally, the option has been completely removed in Linux 4.12, which now
|
||||
leads to annoying "No such file or directory" errors whenever the
|
||||
portblock agent runs on a semi-modern kernel.
|
||||
|
||||
Thus, remove the line enabling the option.
|
||||
|
||||
[0] https://vincent.bernat.ch/en/blog/2014-tcp-time-wait-state-linux
|
||||
---
|
||||
heartbeat/portblock | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/heartbeat/portblock b/heartbeat/portblock
|
||||
index 7b9f5ca3..e88ecc2a 100755
|
||||
--- a/heartbeat/portblock
|
||||
+++ b/heartbeat/portblock
|
||||
@@ -328,7 +328,6 @@ save_tcp_connections()
|
||||
tickle_remote()
|
||||
{
|
||||
[ -z "$OCF_RESKEY_tickle_dir" ] && return
|
||||
- echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
|
||||
f=$OCF_RESKEY_tickle_dir/$OCF_RESKEY_ip
|
||||
[ -r $f ] || return
|
||||
$TICKLETCP -n 3 < $f
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1,25 +1,10 @@
|
||||
Name: resource-agents
|
||||
Summary: Open Source HA Reusable Cluster Resource Scripts
|
||||
Version: 4.13.0
|
||||
Release: 15
|
||||
Version: 4.15.1
|
||||
Release: 1
|
||||
License: GPLv2+ and LGPLv2+
|
||||
URL: https://github.com/ClusterLabs/resource-agents
|
||||
Source0: https://github.com/ClusterLabs/resource-agents/archive/v%{version}.tar.gz
|
||||
Patch0000: fix-failed-to-parse-pid-from-pid-file.patch
|
||||
Patch0001: Fix-PRIMARY_IFACE-variable.patch
|
||||
Patch0002: fix-loopback-handling.patch
|
||||
Patch0003: fix-handler-out-of-scope-leak.patch
|
||||
Patch0004: fix-uninitialized-value-covscan-error.patch
|
||||
Patch0005: Avoid-false-positive-for-VG-activation.patch
|
||||
Patch0006: Don-t-build-with-ansi-by-default.patch
|
||||
Patch0007: Fix-docker-RA-behavior-when-Docker-isn-t-running.patch
|
||||
Patch0008: Low-IPaddr2-Remove-stray-backslash.patch
|
||||
Patch0009: Doc-Delay-Drop-old-comments.patch
|
||||
Patch0010: portblock-accept-numeric-protocol-from-iptables.patch
|
||||
Patch0011: all-agents-remove-S-state-status-that-are-either-ign.patch
|
||||
Patch0012: nfsserver-fix-server-scope-functionality-for-both-po.patch
|
||||
Patch0013: Fix-openstack-info-Ensure-no-newlines-in-openstack.patch
|
||||
Patch0014: portblock-remove-write-to-tcp_tw_recycle.patch
|
||||
Obsoletes: heartbeat-resources <= %{version}
|
||||
Provides: heartbeat-resources = %{version}
|
||||
BuildRequires: automake autoconf pkgconfig gcc perl-interpreter perl-generators python3-devel
|
||||
@ -117,6 +102,11 @@ export CFLAGS="$(echo '%{optflags}')"
|
||||
%{_mandir}/man8/{ocf-tester.8*,ldirectord.8*}
|
||||
|
||||
%changelog
|
||||
* Mon Aug 05 2024 zouzhimin <zouzhimin@kylinos.cn> - 4.15.1-1
|
||||
- update to 4.15.1
|
||||
- IPaddr2: dont fail with "IPv4 does not support lvs_ipv6_addrlabel"
|
||||
error, as the parameter is not used in IPv4 scenarioes
|
||||
|
||||
* Wed Apr 10 2024 bixiaoyan <bixiaoyan@kylinos.cn> - 4.13.0-15
|
||||
- portblock: remove write to tcp_tw_recycle
|
||||
|
||||
|
||||
BIN
v4.13.0.tar.gz
BIN
v4.13.0.tar.gz
Binary file not shown.
BIN
v4.15.1.tar.gz
Normal file
BIN
v4.15.1.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user