Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
bf604d7cb9
!49 [sync] PR-47: update to 4.15.1 and fix build error
From: @openeuler-sync-bot 
Reviewed-by: @xiangbudaomz 
Signed-off-by: @xiangbudaomz
2024-08-05 06:05:10 +00:00
zouzhimin
e0914c2209 update to 4.15.1
(cherry picked from commit 09a813e407d237dc6d90aad62593184141118de4)
2024-08-05 13:48:56 +08:00
openeuler-ci-bot
bc901f2f19
!36 [sync] PR-35: portblock: remove write to tcp_tw_recycle
From: @openeuler-sync-bot 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
2024-04-10 08:19:04 +00:00
bixiaoyan
e6f7e5c1f2 portblock: remove write to tcp_tw_recycle
(cherry picked from commit edfd48a6ae81ce70a293327b24d0c06759e6dfc7)
2024-04-10 15:51:54 +08:00
openeuler-ci-bot
a94f392e87
!34 [sync] PR-33: Fix: openstack-info: Ensure no newlines in openstack_ports
From: @openeuler-sync-bot 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
2024-04-10 07:35:54 +00:00
bixiaoyan
f86ce0fff6 Fix: openstack-info: Ensure no newlines in openstack_ports
(cherry picked from commit 53cb99938ed90a91affc7c54a103b53239578413)
2024-04-10 15:25:28 +08:00
openeuler-ci-bot
9809eff87b
!32 [sync] PR-29: nfsserver: fix "server scope" functionality for both potentially other dropins AND multiple ExecStart
From: @openeuler-sync-bot 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
2024-04-09 05:32:17 +00:00
zouzhimin
2a37b296bc nfsserver: fix server scope functionality for both potentially other dropins AND multiple ExecStart
(cherry picked from commit df5e54ee169c6528f07bcbba14f6ddd474e9f8ad)
2024-04-09 11:37:58 +08:00
openeuler-ci-bot
ed9617934d
!31 [sync] PR-28: all agents: remove -S state/status that are either ignored, or give an error message in newer versions of Pacemaker
From: @openeuler-sync-bot 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
2024-04-09 03:37:17 +00:00
zouzhimin
3e4e1be35e all agents: remove -S state/status that are either ignored
(cherry picked from commit c5ac8c643495bb4ee11965f7c1de96c3e4f984ec)
2024-04-09 10:35:36 +08:00
14 changed files with 19 additions and 434 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,21 +1,10 @@
Name: resource-agents
Summary: Open Source HA Reusable Cluster Resource Scripts
Version: 4.13.0
Release: 11
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
Obsoletes: heartbeat-resources <= %{version}
Provides: heartbeat-resources = %{version}
BuildRequires: automake autoconf pkgconfig gcc perl-interpreter perl-generators python3-devel
@ -113,6 +102,23 @@ 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
* Wed Apr 10 2024 bixiaoyan <bixiaoyan@kylinos.cn> - 4.13.0-14
- Fix: openstack-info: Ensure no newlines in openstack_ports
* Mon Apr 08 2024 zouzhimin <zouzhimin@kylinos.cn> - 4.13.0-13
- nfsserver: fix "server scope" functionality for both potentially other dropins AND multiple ExecStart
* Fri Mar 29 2024 zouzhimin <zouzhimin@kylinos.cn> - 4.13.0-12
- all agents: remove -S state/status that are either ignored
* Mon Mar 25 2024 bixiaoyan <bixiaoyan@kylinos.cn> - 4.13.0-11
- portblock: accept numeric protocol from iptables

Binary file not shown.

BIN
v4.15.1.tar.gz Normal file

Binary file not shown.