From c5ac8c643495bb4ee11965f7c1de96c3e4f984ec Mon Sep 17 00:00:00 2001 From: zouzhimin Date: Thu, 21 Mar 2024 11:03:41 +0800 Subject: [PATCH] all agents: remove -S state/status that are either ignored --- ...e-S-state-status-that-are-either-ign.patch | 113 ++++++++++++++++++ resource-agents.spec | 6 +- 2 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 all-agents-remove-S-state-status-that-are-either-ign.patch diff --git a/all-agents-remove-S-state-status-that-are-either-ign.patch b/all-agents-remove-S-state-status-that-are-either-ign.patch new file mode 100644 index 0000000..5e863a0 --- /dev/null +++ b/all-agents-remove-S-state-status-that-are-either-ign.patch @@ -0,0 +1,113 @@ +From f97fee4af31822c40c318562d8cc707ced0aa11c Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +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 + diff --git a/resource-agents.spec b/resource-agents.spec index 1f01bf9..5cef791 100644 --- a/resource-agents.spec +++ b/resource-agents.spec @@ -1,7 +1,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 4.13.0 -Release: 11 +Release: 12 License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents Source0: https://github.com/ClusterLabs/resource-agents/archive/v%{version}.tar.gz @@ -16,6 +16,7 @@ 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 Obsoletes: heartbeat-resources <= %{version} Provides: heartbeat-resources = %{version} BuildRequires: automake autoconf pkgconfig gcc perl-interpreter perl-generators python3-devel @@ -113,6 +114,9 @@ export CFLAGS="$(echo '%{optflags}')" %{_mandir}/man8/{ocf-tester.8*,ldirectord.8*} %changelog +* Fri Mar 29 2024 zouzhimin - 4.13.0-12 +- all agents: remove -S state/status that are either ignored + * Mon Mar 25 2024 bixiaoyan - 4.13.0-11 - portblock: accept numeric protocol from iptables -- Gitee