import fence-agents-4.2.1-95.el8
This commit is contained in:
parent
7bfadd963e
commit
0b46bcfb97
@ -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/bz2080729-2-fence_lpar-fix-import-fail_usage.patch
Normal file
65
SOURCES/bz2080729-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)
|
||||||
|
|
||||||
@ -87,7 +87,7 @@
|
|||||||
Name: fence-agents
|
Name: fence-agents
|
||||||
Summary: Set of unified programs capable of host isolation ("fencing")
|
Summary: Set of unified programs capable of host isolation ("fencing")
|
||||||
Version: 4.2.1
|
Version: 4.2.1
|
||||||
Release: 94%{?alphatag:.%{alphatag}}%{?dist}
|
Release: 95%{?alphatag:.%{alphatag}}%{?dist}
|
||||||
License: GPLv2+ and LGPLv2+
|
License: GPLv2+ and LGPLv2+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
URL: https://github.com/ClusterLabs/fence-agents
|
URL: https://github.com/ClusterLabs/fence-agents
|
||||||
@ -286,6 +286,8 @@ Patch111: bz1886074-3-fence_openstack-bundled.patch
|
|||||||
Patch112: bz2072421-all-agents-unify-ssl-parameters.patch
|
Patch112: bz2072421-all-agents-unify-ssl-parameters.patch
|
||||||
Patch113: bz2078244-fence_gce-update.patch
|
Patch113: bz2078244-fence_gce-update.patch
|
||||||
Patch114: bz2080994-fence_ibm_vpc-fix-parameters.patch
|
Patch114: bz2080994-fence_ibm_vpc-fix-parameters.patch
|
||||||
|
Patch115: bz2080729-1-fence_apc-fence_ilo_moonshot-import-logging.patch
|
||||||
|
Patch116: bz2080729-2-fence_lpar-fix-import-fail_usage.patch
|
||||||
|
|
||||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||||
%global supportedagents amt_ws apc apc_snmp bladecenter brocade cisco_mds cisco_ucs compute drac5 eaton_snmp emerson eps evacuate hds_cb 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
|
%global supportedagents amt_ws apc apc_snmp bladecenter brocade cisco_mds cisco_ucs compute drac5 eaton_snmp emerson eps evacuate hds_cb 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
|
||||||
@ -478,6 +480,8 @@ BuildRequires: python3-google-api-client python3-pip python3-wheel python3-jinja
|
|||||||
%patch112 -p1
|
%patch112 -p1
|
||||||
%patch113 -p1
|
%patch113 -p1
|
||||||
%patch114 -p1
|
%patch114 -p1
|
||||||
|
%patch115 -p1
|
||||||
|
%patch116 -p1
|
||||||
|
|
||||||
# prevent compilation of something that won't get used anyway
|
# prevent compilation of something that won't get used anyway
|
||||||
sed -i.orig 's|FENCE_ZVM=1|FENCE_ZVM=0|' configure.ac
|
sed -i.orig 's|FENCE_ZVM=1|FENCE_ZVM=0|' configure.ac
|
||||||
@ -1502,6 +1506,10 @@ Fence agent for IBM z/VM over IP.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue May 17 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-95
|
||||||
|
- fence_apc/fence_ilo_moonshot/fence_lpar: add missing "import logging"
|
||||||
|
Resolves: rhbz#2080729
|
||||||
|
|
||||||
* Thu May 5 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-94
|
* Thu May 5 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-94
|
||||||
- fence_ibm_vpc: remove unused instance parameter and make limit
|
- fence_ibm_vpc: remove unused instance parameter and make limit
|
||||||
optional
|
optional
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user