- azure-events*: fix for no "Transition Summary" for Pacemaker 2.1+
- Filesystem: fail if AWS efs-utils not installed when fstype=efs Resolves: rhbz#2181019 Resolves: rhbz#2183152
This commit is contained in:
parent
9ab6ab5bfd
commit
e6153bd5bf
54
bz2181019-azure-events-1-fix-no-transition-summary.patch
Normal file
54
bz2181019-azure-events-1-fix-no-transition-summary.patch
Normal file
@ -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
bz2181019-azure-events-2-improve-logic.patch
Normal file
77
bz2181019-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
|
23
bz2183152-Filesystem-fail-efs-utils-not-installed.patch
Normal file
23
bz2183152-Filesystem-fail-efs-utils-not-installed.patch
Normal file
@ -0,0 +1,23 @@
|
||||
From b02b06c437b1d8cb1dcfe8ace47c2efc4a0e476c Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Thu, 30 Mar 2023 14:44:41 +0200
|
||||
Subject: [PATCH] Filesystem: fail if AWS efs-utils not installed when
|
||||
fstype=efs
|
||||
|
||||
---
|
||||
heartbeat/Filesystem | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem
|
||||
index 65088029ec..50c68f115b 100755
|
||||
--- a/heartbeat/Filesystem
|
||||
+++ b/heartbeat/Filesystem
|
||||
@@ -456,7 +456,7 @@ fstype_supported()
|
||||
# System (EFS)
|
||||
case "$FSTYPE" in
|
||||
fuse.*|glusterfs|rozofs) support="fuse";;
|
||||
- efs) support="nfs4";;
|
||||
+ efs) check_binary "mount.efs"; support="nfs4";;
|
||||
esac
|
||||
|
||||
if [ "$support" != "$FSTYPE" ]; then
|
@ -69,7 +69,7 @@
|
||||
Name: resource-agents
|
||||
Summary: Open Source HA Reusable Cluster Resource Scripts
|
||||
Version: 4.9.0
|
||||
Release: 41%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
|
||||
Release: 42%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
|
||||
License: GPLv2+ and LGPLv2+
|
||||
URL: https://github.com/ClusterLabs/resource-agents
|
||||
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
|
||||
@ -140,6 +140,9 @@ Patch48: bz2040110-IPaddr2-IPsrcaddr-support-policy-based-routing.patch
|
||||
Patch49: bz2149970-lvmlockd-add-use_lvmlockd-if-missing.patch
|
||||
Patch50: bz2154727-ethmonitor-dont-log-iface-doesnt-exist-monitor.patch
|
||||
Patch51: bz2039692-mysql-replication-fixes.patch
|
||||
Patch52: bz2181019-azure-events-1-fix-no-transition-summary.patch
|
||||
Patch53: bz2181019-azure-events-2-improve-logic.patch
|
||||
Patch54: bz2183152-Filesystem-fail-efs-utils-not-installed.patch
|
||||
|
||||
# bundle patches
|
||||
Patch1000: 7-gcp-bundled.patch
|
||||
@ -371,6 +374,9 @@ exit 1
|
||||
%patch49 -p1
|
||||
%patch50 -p1
|
||||
%patch51 -p1
|
||||
%patch52 -p1
|
||||
%patch53 -p1
|
||||
%patch54 -p1
|
||||
|
||||
chmod 755 heartbeat/nova-compute-wait
|
||||
chmod 755 heartbeat/NovaEvacuate
|
||||
@ -946,6 +952,13 @@ ccs_update_schema > /dev/null 2>&1 ||:
|
||||
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
|
||||
|
||||
%changelog
|
||||
* Mon May 1 2023 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.9.0-42
|
||||
- azure-events*: fix for no "Transition Summary" for Pacemaker 2.1+
|
||||
- Filesystem: fail if AWS efs-utils not installed when fstype=efs
|
||||
|
||||
Resolves: rhbz#2181019
|
||||
Resolves: rhbz#2183152
|
||||
|
||||
* Wed Mar 22 2023 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.9.0-41
|
||||
- IPaddr2/IPsrcaddr: support policy-based routing
|
||||
- lvmlockd: add "use_lvmlockd = 1" if it's commented out or missing
|
||||
|
Loading…
Reference in New Issue
Block a user