import fence-agents-4.10.0-20.el9_0.2
This commit is contained in:
parent
46355fc3ba
commit
cd38770861
@ -0,0 +1,34 @@
|
||||
From 6ea2c6b5d1cc51e93fa7084d76d9272512461e58 Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Mon, 16 May 2022 11:01:21 +0200
|
||||
Subject: [PATCH] fence_apc/fence_ilo_moonshot: add missing "import logging"
|
||||
|
||||
---
|
||||
agents/apc/fence_apc.py | 1 +
|
||||
agents/ilo_moonshot/fence_ilo_moonshot.py | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/agents/apc/fence_apc.py b/agents/apc/fence_apc.py
|
||||
index 901aad25e..3ea0f37d6 100644
|
||||
--- a/agents/apc/fence_apc.py
|
||||
+++ b/agents/apc/fence_apc.py
|
||||
@@ -15,6 +15,7 @@
|
||||
#####
|
||||
|
||||
import sys, re, time
|
||||
+import logging
|
||||
import atexit
|
||||
sys.path.append("@FENCEAGENTSLIBDIR@")
|
||||
from fencing import *
|
||||
diff --git a/agents/ilo_moonshot/fence_ilo_moonshot.py b/agents/ilo_moonshot/fence_ilo_moonshot.py
|
||||
index 6f5cca320..1923eeb1c 100644
|
||||
--- a/agents/ilo_moonshot/fence_ilo_moonshot.py
|
||||
+++ b/agents/ilo_moonshot/fence_ilo_moonshot.py
|
||||
@@ -1,6 +1,7 @@
|
||||
#!@PYTHON@ -tt
|
||||
|
||||
import sys
|
||||
+import logging
|
||||
import atexit
|
||||
sys.path.append("@FENCEAGENTSLIBDIR@")
|
||||
from fencing import *
|
65
SOURCES/bz2086839-2-fence_lpar-fix-import-fail_usage.patch
Normal file
65
SOURCES/bz2086839-2-fence_lpar-fix-import-fail_usage.patch
Normal file
@ -0,0 +1,65 @@
|
||||
From e3dff8570b70f0c19eca84cf02f0aadd68e16599 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Renninger <trenn@suse.com>
|
||||
Date: Fri, 25 Feb 2022 14:05:42 +0100
|
||||
Subject: [PATCH] fence_lpar: fix missing import logging, use fail_usage
|
||||
|
||||
and slightly re-factor code to avoid duplicate code lines.
|
||||
Should be cleanup only, no functional change.
|
||||
---
|
||||
agents/lpar/fence_lpar.py | 39 ++++++++++++++++++---------------------
|
||||
1 file changed, 18 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/agents/lpar/fence_lpar.py b/agents/lpar/fence_lpar.py
|
||||
index ad18c6191..2046b0e4e 100644
|
||||
--- a/agents/lpar/fence_lpar.py
|
||||
+++ b/agents/lpar/fence_lpar.py
|
||||
@@ -28,31 +28,28 @@ def _normalize_status(status):
|
||||
|
||||
def get_power_status(conn, options):
|
||||
if options["--hmc-version"] == "3":
|
||||
- conn.send("lssyscfg -r lpar -m " + options["--managed"] + " -n " + options["--plug"] + " -F name,state\n")
|
||||
-
|
||||
- # First line (command) may cause parsing issues if long
|
||||
- conn.readline()
|
||||
- conn.log_expect(options["--command-prompt"], int(options["--power-timeout"]))
|
||||
-
|
||||
- try:
|
||||
- status = re.compile("^" + options["--plug"] + ",(.*?),.*$",
|
||||
- re.IGNORECASE | re.MULTILINE).search(conn.before).group(1)
|
||||
- except AttributeError as e:
|
||||
- logging.error("Failed: {}".format(str(e)))
|
||||
- fail(EC_STATUS_HMC)
|
||||
+ command = "lssyscfg -r lpar -m " + options["--managed"] + " -n " + options["--plug"] + " -F name,state\n"
|
||||
elif options["--hmc-version"] in ["4", "IVM"]:
|
||||
- conn.send("lssyscfg -r lpar -m "+ options["--managed"] +
|
||||
- " --filter 'lpar_names=" + options["--plug"] + "'\n")
|
||||
+ command = "lssyscfg -r lpar -m "+ options["--managed"] + \
|
||||
+ " --filter 'lpar_names=" + options["--plug"] + "'\n"
|
||||
+ else:
|
||||
+ # Bad HMC Version cannot be reached
|
||||
+ fail(EC_STATUS_HMC)
|
||||
|
||||
- # First line (command) may cause parsing issues if long
|
||||
- conn.readline()
|
||||
- conn.log_expect(options["--command-prompt"], int(options["--power-timeout"]))
|
||||
+ conn.send(command)
|
||||
+ # First line (command) may cause parsing issues if long
|
||||
+ conn.readline()
|
||||
+ conn.log_expect(options["--command-prompt"], int(options["--power-timeout"]))
|
||||
|
||||
- try:
|
||||
+ try:
|
||||
+ if options["--hmc-version"] == "3":
|
||||
+ status = re.compile("^" + options["--plug"] + ",(.*?),.*$",
|
||||
+ re.IGNORECASE | re.MULTILINE).search(conn.before).group(1)
|
||||
+ elif options["--hmc-version"] in ["4", "IVM"]:
|
||||
status = re.compile(",state=(.*?),", re.IGNORECASE).search(conn.before).group(1)
|
||||
- except AttributeError as e:
|
||||
- logging.error("Failed: {}".format(str(e)))
|
||||
- fail(EC_STATUS_HMC)
|
||||
+ except AttributeError as e:
|
||||
+ fail_usage("Command on HMC failed: {}\n{}".format(command, str(e)), False)
|
||||
+ fail(EC_STATUS_HMC)
|
||||
|
||||
return _normalize_status(status)
|
||||
|
@ -59,7 +59,7 @@
|
||||
Name: fence-agents
|
||||
Summary: Set of unified programs capable of host isolation ("fencing")
|
||||
Version: 4.10.0
|
||||
Release: 20%{?alphatag:.%{alphatag}}%{?dist}
|
||||
Release: 20%{?alphatag:.%{alphatag}}%{?dist}.2
|
||||
License: GPLv2+ and LGPLv2+
|
||||
URL: https://github.com/ClusterLabs/fence-agents
|
||||
Source0: https://fedorahosted.org/releases/f/e/fence-agents/%{name}-%{version}.tar.gz
|
||||
@ -232,6 +232,8 @@ Patch15: bz2041933-bz2041935-1-fence_openstack-clouds-openrc.patch
|
||||
Patch16: bz2041933-bz2041935-2-fence_openstack-clouds-openrc.patch
|
||||
Patch17: bz2042496-fence_ibm_vpc-fence_ibm_powervs.patch
|
||||
Patch18: bz2022334-fence_zvmip-add-disable-ssl.patch
|
||||
Patch19: bz2086839-1-fence_apc-fence_ilo_moonshot-import-logging.patch
|
||||
Patch20: bz2086839-2-fence_lpar-fix-import-fail_usage.patch
|
||||
|
||||
%global supportedagents amt_ws apc apc_snmp bladecenter brocade cisco_mds cisco_ucs compute drac5 eaton_snmp emerson eps evacuate hpblade ibmblade ibm_powervs ibm_vpc ifmib ilo ilo_moonshot ilo_mp ilo_ssh intelmodular ipdu ipmilan kdump kubevirt lpar mpath redfish rhevm rsa rsb sbd scsi vmware_rest vmware_soap wti
|
||||
%ifarch x86_64
|
||||
@ -361,6 +363,8 @@ BuildRequires: %{systemd_units}
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
%patch19 -p1
|
||||
%patch20 -p1
|
||||
|
||||
# prevent compilation of something that won't get used anyway
|
||||
sed -i.orig 's|FENCE_ZVM=1|FENCE_ZVM=0|' configure.ac
|
||||
@ -1452,6 +1456,10 @@ are located on corosync cluster nodes.
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue May 17 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-20.2
|
||||
- fence_apc/fence_ilo_moonshot/fence_lpar: add missing "import logging"
|
||||
Resolves: rhbz#2086839
|
||||
|
||||
* Wed Mar 9 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-20
|
||||
- fence_ibm_vpc: new fence agent
|
||||
Resolves: rhbz#2060562
|
||||
|
Loading…
Reference in New Issue
Block a user