Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
e90ae95ec9 | |||
59dcdf2589 | |||
eb1a4e01bc |
@ -0,0 +1,54 @@
|
|||||||
|
From 81bb58b05d2ddabd17fe31af39f0e857e61db3c9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||||
|
Date: Tue, 28 Mar 2023 16:53:45 +0200
|
||||||
|
Subject: [PATCH] azure-events*: fix for no "Transition Summary" for Pacemaker
|
||||||
|
2.1+
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/azure-events-az.in | 8 ++++----
|
||||||
|
heartbeat/azure-events.in | 6 +++---
|
||||||
|
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/azure-events-az.in b/heartbeat/azure-events-az.in
|
||||||
|
index 59d0953061..67c02c6422 100644
|
||||||
|
--- a/heartbeat/azure-events-az.in
|
||||||
|
+++ b/heartbeat/azure-events-az.in
|
||||||
|
@@ -311,10 +311,10 @@ class clusterHelper:
|
||||||
|
summary = clusterHelper._exec("crm_simulate", "-Ls")
|
||||||
|
if not summary:
|
||||||
|
ocf.logger.warning("transitionSummary: could not load transition summary")
|
||||||
|
- return False
|
||||||
|
+ return ""
|
||||||
|
if summary.find("Transition Summary:") < 0:
|
||||||
|
- ocf.logger.warning("transitionSummary: received unexpected transition summary: %s" % summary)
|
||||||
|
- return False
|
||||||
|
+ ocf.logger.debug("transitionSummary: no transactions: %s" % summary)
|
||||||
|
+ return ""
|
||||||
|
summary = summary.split("Transition Summary:")[1]
|
||||||
|
ret = summary.split("\n").pop(0)
|
||||||
|
|
||||||
|
@@ -768,4 +768,4 @@ def main():
|
||||||
|
agent.run()
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
- main()
|
||||||
|
\ No newline at end of file
|
||||||
|
+ main()
|
||||||
|
diff --git a/heartbeat/azure-events.in b/heartbeat/azure-events.in
|
||||||
|
index 66e129060a..5ad658df93 100644
|
||||||
|
--- a/heartbeat/azure-events.in
|
||||||
|
+++ b/heartbeat/azure-events.in
|
||||||
|
@@ -310,10 +310,10 @@ class clusterHelper:
|
||||||
|
summary = clusterHelper._exec("crm_simulate", "-Ls")
|
||||||
|
if not summary:
|
||||||
|
ocf.logger.warning("transitionSummary: could not load transition summary")
|
||||||
|
- return False
|
||||||
|
+ return ""
|
||||||
|
if summary.find("Transition Summary:") < 0:
|
||||||
|
- ocf.logger.warning("transitionSummary: received unexpected transition summary: %s" % summary)
|
||||||
|
- return False
|
||||||
|
+ ocf.logger.debug("transitionSummary: no transactions: %s" % summary)
|
||||||
|
+ return ""
|
||||||
|
summary = summary.split("Transition Summary:")[1]
|
||||||
|
ret = summary.split("\n").pop(0)
|
||||||
|
|
77
SOURCES/bz2182415-azure-events-2-improve-logic.patch
Normal file
77
SOURCES/bz2182415-azure-events-2-improve-logic.patch
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
From ff53e5c8d6867e580506d132fba6fcf6aa46b804 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Varkoly <varkoly@suse.com>
|
||||||
|
Date: Sat, 29 Apr 2023 08:09:11 +0200
|
||||||
|
Subject: [PATCH] Use -LS instead of -Ls as parameter to get the Transition
|
||||||
|
Summary
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/azure-events-az.in | 9 +++++----
|
||||||
|
heartbeat/azure-events.in | 9 +++++----
|
||||||
|
2 files changed, 10 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/azure-events-az.in b/heartbeat/azure-events-az.in
|
||||||
|
index 67c02c642..46d4d1f3d 100644
|
||||||
|
--- a/heartbeat/azure-events-az.in
|
||||||
|
+++ b/heartbeat/azure-events-az.in
|
||||||
|
@@ -298,7 +298,7 @@ class clusterHelper:
|
||||||
|
Get the current Pacemaker transition summary (used to check if all resources are stopped when putting a node standby)
|
||||||
|
"""
|
||||||
|
# <tniek> Is a global crm_simulate "too much"? Or would it be sufficient it there are no planned transitions for a particular node?
|
||||||
|
- # # crm_simulate -Ls
|
||||||
|
+ # # crm_simulate -LS
|
||||||
|
# Transition Summary:
|
||||||
|
# * Promote rsc_SAPHana_HN1_HDB03:0 (Slave -> Master hsr3-db1)
|
||||||
|
# * Stop rsc_SAPHana_HN1_HDB03:1 (hsr3-db0)
|
||||||
|
@@ -308,15 +308,16 @@ class clusterHelper:
|
||||||
|
# Transition Summary:
|
||||||
|
ocf.logger.debug("transitionSummary: begin")
|
||||||
|
|
||||||
|
- summary = clusterHelper._exec("crm_simulate", "-Ls")
|
||||||
|
+ summary = clusterHelper._exec("crm_simulate", "-LS")
|
||||||
|
if not summary:
|
||||||
|
ocf.logger.warning("transitionSummary: could not load transition summary")
|
||||||
|
return ""
|
||||||
|
if summary.find("Transition Summary:") < 0:
|
||||||
|
ocf.logger.debug("transitionSummary: no transactions: %s" % summary)
|
||||||
|
return ""
|
||||||
|
- summary = summary.split("Transition Summary:")[1]
|
||||||
|
- ret = summary.split("\n").pop(0)
|
||||||
|
+ j=summary.find('Transition Summary:') + len('Transition Summary:')
|
||||||
|
+ l=summary.lower().find('executing cluster transition:')
|
||||||
|
+ ret = list(filter(str.strip, summary[j:l].split("\n")))
|
||||||
|
|
||||||
|
ocf.logger.debug("transitionSummary: finished; return = %s" % str(ret))
|
||||||
|
return ret
|
||||||
|
diff --git a/heartbeat/azure-events.in b/heartbeat/azure-events.in
|
||||||
|
index 5ad658df9..90acaba62 100644
|
||||||
|
--- a/heartbeat/azure-events.in
|
||||||
|
+++ b/heartbeat/azure-events.in
|
||||||
|
@@ -297,7 +297,7 @@ class clusterHelper:
|
||||||
|
Get the current Pacemaker transition summary (used to check if all resources are stopped when putting a node standby)
|
||||||
|
"""
|
||||||
|
# <tniek> Is a global crm_simulate "too much"? Or would it be sufficient it there are no planned transitions for a particular node?
|
||||||
|
- # # crm_simulate -Ls
|
||||||
|
+ # # crm_simulate -LS
|
||||||
|
# Transition Summary:
|
||||||
|
# * Promote rsc_SAPHana_HN1_HDB03:0 (Slave -> Master hsr3-db1)
|
||||||
|
# * Stop rsc_SAPHana_HN1_HDB03:1 (hsr3-db0)
|
||||||
|
@@ -307,15 +307,16 @@ class clusterHelper:
|
||||||
|
# Transition Summary:
|
||||||
|
ocf.logger.debug("transitionSummary: begin")
|
||||||
|
|
||||||
|
- summary = clusterHelper._exec("crm_simulate", "-Ls")
|
||||||
|
+ summary = clusterHelper._exec("crm_simulate", "-LS")
|
||||||
|
if not summary:
|
||||||
|
ocf.logger.warning("transitionSummary: could not load transition summary")
|
||||||
|
return ""
|
||||||
|
if summary.find("Transition Summary:") < 0:
|
||||||
|
ocf.logger.debug("transitionSummary: no transactions: %s" % summary)
|
||||||
|
return ""
|
||||||
|
- summary = summary.split("Transition Summary:")[1]
|
||||||
|
- ret = summary.split("\n").pop(0)
|
||||||
|
+ j=summary.find('Transition Summary:') + len('Transition Summary:')
|
||||||
|
+ l=summary.lower().find('executing cluster transition:')
|
||||||
|
+ ret = list(filter(str.strip, summary[j:l].split("\n")))
|
||||||
|
|
||||||
|
ocf.logger.debug("transitionSummary: finished; return = %s" % str(ret))
|
||||||
|
return ret
|
@ -0,0 +1,79 @@
|
|||||||
|
From cf2fd2a9cf06dc2e915f2fb5dbcc5e09e907a6df Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||||
|
Date: Thu, 5 Oct 2023 11:53:18 +0200
|
||||||
|
Subject: [PATCH] findif.sh: dont use table parameter as it returns no netmask
|
||||||
|
(tested with main/local/custom tables)
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/IPaddr2 | 12 ------------
|
||||||
|
heartbeat/findif.sh | 8 ++++----
|
||||||
|
2 files changed, 4 insertions(+), 16 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2
|
||||||
|
index e8384c5866..97a7431a24 100755
|
||||||
|
--- a/heartbeat/IPaddr2
|
||||||
|
+++ b/heartbeat/IPaddr2
|
||||||
|
@@ -73,7 +73,6 @@ OCF_RESKEY_ip_default=""
|
||||||
|
OCF_RESKEY_cidr_netmask_default=""
|
||||||
|
OCF_RESKEY_broadcast_default=""
|
||||||
|
OCF_RESKEY_iflabel_default=""
|
||||||
|
-OCF_RESKEY_table_default=""
|
||||||
|
OCF_RESKEY_cidr_netmask_default=""
|
||||||
|
OCF_RESKEY_lvs_support_default=false
|
||||||
|
OCF_RESKEY_lvs_ipv6_addrlabel_default=false
|
||||||
|
@@ -98,7 +97,6 @@ OCF_RESKEY_network_namespace_default=""
|
||||||
|
: ${OCF_RESKEY_cidr_netmask=${OCF_RESKEY_cidr_netmask_default}}
|
||||||
|
: ${OCF_RESKEY_broadcast=${OCF_RESKEY_broadcast_default}}
|
||||||
|
: ${OCF_RESKEY_iflabel=${OCF_RESKEY_iflabel_default}}
|
||||||
|
-: ${OCF_RESKEY_table=${OCF_RESKEY_table_default}}
|
||||||
|
: ${OCF_RESKEY_lvs_support=${OCF_RESKEY_lvs_support_default}}
|
||||||
|
: ${OCF_RESKEY_lvs_ipv6_addrlabel=${OCF_RESKEY_lvs_ipv6_addrlabel_default}}
|
||||||
|
: ${OCF_RESKEY_lvs_ipv6_addrlabel_value=${OCF_RESKEY_lvs_ipv6_addrlabel_value_default}}
|
||||||
|
@@ -241,16 +239,6 @@ If a label is specified in nic name, this parameter has no effect.
|
||||||
|
<content type="string" default="${OCF_RESKEY_iflabel_default}"/>
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
-<parameter name="table">
|
||||||
|
-<longdesc lang="en">
|
||||||
|
-Table to use to lookup which interface to use for the IP.
|
||||||
|
-
|
||||||
|
-This can be used for policy based routing. See man ip-rule(8).
|
||||||
|
-</longdesc>
|
||||||
|
-<shortdesc lang="en">Table</shortdesc>
|
||||||
|
-<content type="string" default="${OCF_RESKEY_table_default}" />
|
||||||
|
-</parameter>
|
||||||
|
-
|
||||||
|
<parameter name="lvs_support">
|
||||||
|
<longdesc lang="en">
|
||||||
|
Enable support for LVS Direct Routing configurations. In case a IP
|
||||||
|
diff --git a/heartbeat/findif.sh b/heartbeat/findif.sh
|
||||||
|
index 6c04c98c19..5f1c19ec3c 100644
|
||||||
|
--- a/heartbeat/findif.sh
|
||||||
|
+++ b/heartbeat/findif.sh
|
||||||
|
@@ -32,7 +32,7 @@ prefixcheck() {
|
||||||
|
getnetworkinfo()
|
||||||
|
{
|
||||||
|
local line netinfo
|
||||||
|
- ip -o -f inet route list match $OCF_RESKEY_ip table "${OCF_RESKEY_table:=main}" scope host | (while read line;
|
||||||
|
+ ip -o -f inet route list match $OCF_RESKEY_ip scope host | (while read line;
|
||||||
|
do
|
||||||
|
netinfo=`echo $line | awk '{print $2}'`
|
||||||
|
case $netinfo in
|
||||||
|
@@ -210,14 +210,14 @@ findif()
|
||||||
|
fi
|
||||||
|
findif_check_params $family || return $?
|
||||||
|
|
||||||
|
- if [ -n "$netmask" ] ; then
|
||||||
|
+ if [ -n "$netmask" ]; then
|
||||||
|
match=$match/$netmask
|
||||||
|
fi
|
||||||
|
if [ -n "$nic" ] ; then
|
||||||
|
# NIC supports more than two.
|
||||||
|
- set -- $(ip -o -f $family route list match $match $scope table "${OCF_RESKEY_table:=main}" | grep "dev $nic " | awk 'BEGIN{best=0} /\// { mask=$1; sub(".*/", "", mask); if( int(mask)>=best ) { best=int(mask); best_ln=$0; } } END{print best_ln}')
|
||||||
|
+ set -- $(ip -o -f $family route list match $match $scope | grep "dev $nic " | awk 'BEGIN{best=0} /\// { mask=$1; sub(".*/", "", mask); if( int(mask)>=best ) { best=int(mask); best_ln=$0; } } END{print best_ln}')
|
||||||
|
else
|
||||||
|
- set -- $(ip -o -f $family route list match $match $scope table "${OCF_RESKEY_table:=main}" | awk 'BEGIN{best=0} /\// { mask=$1; sub(".*/", "", mask); if( int(mask)>=best ) { best=int(mask); best_ln=$0; } } END{print best_ln}')
|
||||||
|
+ set -- $(ip -o -f $family route list match $match $scope | awk 'BEGIN{best=0} /\// { mask=$1; sub(".*/", "", mask); if( int(mask)>=best ) { best=int(mask); best_ln=$0; } } END{print best_ln}')
|
||||||
|
fi
|
||||||
|
if [ $# = 0 ] ; then
|
||||||
|
case $OCF_RESKEY_ip in
|
@ -69,7 +69,7 @@
|
|||||||
Name: resource-agents
|
Name: resource-agents
|
||||||
Summary: Open Source HA Reusable Cluster Resource Scripts
|
Summary: Open Source HA Reusable Cluster Resource Scripts
|
||||||
Version: 4.9.0
|
Version: 4.9.0
|
||||||
Release: 47%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
|
Release: 48%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}.alma.1
|
||||||
License: GPLv2+ and LGPLv2+
|
License: GPLv2+ and LGPLv2+
|
||||||
URL: https://github.com/ClusterLabs/resource-agents
|
URL: https://github.com/ClusterLabs/resource-agents
|
||||||
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
|
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
|
||||||
@ -149,6 +149,10 @@ Patch57: bz2189243-Filesystem-1-improve-stop-action.patch
|
|||||||
Patch58: bz2189243-Filesystem-2-fix-incorrect-parameter-types.patch
|
Patch58: bz2189243-Filesystem-2-fix-incorrect-parameter-types.patch
|
||||||
Patch59: bz2189243-Filesystem-3-fix-signal_delay-default-value.patch
|
Patch59: bz2189243-Filesystem-3-fix-signal_delay-default-value.patch
|
||||||
|
|
||||||
|
# Patches were taken from:
|
||||||
|
# https://github.com/ClusterLabs/resource-agents/commit/cf2fd2a9cf06dc2e915f2fb5dbcc5e09e907a6df
|
||||||
|
Patch60: findif-dont-use-table-parameter-as-it-returns-no-netmask.patch
|
||||||
|
|
||||||
# bundle patches
|
# bundle patches
|
||||||
Patch1000: 7-gcp-bundled.patch
|
Patch1000: 7-gcp-bundled.patch
|
||||||
Patch1001: 9-google-cloud-sdk-oauth2client-python-rsa-to-cryptography.patch
|
Patch1001: 9-google-cloud-sdk-oauth2client-python-rsa-to-cryptography.patch
|
||||||
@ -387,6 +391,7 @@ exit 1
|
|||||||
%patch57 -p1
|
%patch57 -p1
|
||||||
%patch58 -p1
|
%patch58 -p1
|
||||||
%patch59 -p1
|
%patch59 -p1
|
||||||
|
%patch60 -p1
|
||||||
|
|
||||||
chmod 755 heartbeat/nova-compute-wait
|
chmod 755 heartbeat/nova-compute-wait
|
||||||
chmod 755 heartbeat/NovaEvacuate
|
chmod 755 heartbeat/NovaEvacuate
|
||||||
@ -962,6 +967,9 @@ ccs_update_schema > /dev/null 2>&1 ||:
|
|||||||
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
|
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 14 2023 Eduard Abdullin <eabdullin@almalinux.org> - 4.9.0-48.alma.1
|
||||||
|
- findif.sh: dont use table parameter as it returns no netmask
|
||||||
|
|
||||||
* Thu Jul 20 2023 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.9.0-47
|
* Thu Jul 20 2023 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.9.0-47
|
||||||
- Filesystem: improve stop-action and allow setting term/kill signals
|
- Filesystem: improve stop-action and allow setting term/kill signals
|
||||||
and signal_delay for large filesystems
|
and signal_delay for large filesystems
|
||||||
|
Loading…
Reference in New Issue
Block a user