import fence-agents-4.2.1-89.el8_6.2

This commit is contained in:
CentOS Sources 2022-06-28 07:00:21 -04:00 committed by root
parent f8137e4c5e
commit 7cf6d1503f
4 changed files with 180 additions and 1 deletions

View File

@ -0,0 +1,65 @@
From d0254345472c9415af1e06e9e8df2fe0ce464db0 Mon Sep 17 00:00:00 2001
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
Date: Mon, 2 May 2022 11:14:42 +0200
Subject: [PATCH] fence_ibm_vpc: remove unused instance parameter and make
limit optional
---
agents/ibm_vpc/fence_ibm_vpc.py | 11 +----------
tests/data/metadata/fence_ibm_vpc.xml | 7 +------
2 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/agents/ibm_vpc/fence_ibm_vpc.py b/agents/ibm_vpc/fence_ibm_vpc.py
index 9f84f7b2d..9e38e8301 100755
--- a/agents/ibm_vpc/fence_ibm_vpc.py
+++ b/agents/ibm_vpc/fence_ibm_vpc.py
@@ -161,14 +161,6 @@ def define_new_opts():
"shortdesc" : "API Key",
"order" : 0
}
- all_opt["instance"] = {
- "getopt" : ":",
- "longopt" : "instance",
- "help" : "--instance=[instance] Cloud Instance",
- "required" : "1",
- "shortdesc" : "Cloud Instance",
- "order" : 0
- }
all_opt["region"] = {
"getopt" : ":",
"longopt" : "region",
@@ -181,7 +173,7 @@ def define_new_opts():
"getopt" : ":",
"longopt" : "limit",
"help" : "--limit=[number] Limit number of nodes returned by API",
- "required" : "1",
+ "required" : "0",
"default": 50,
"shortdesc" : "Number of nodes returned by API",
"order" : 0
@@ -191,7 +183,6 @@ def define_new_opts():
def main():
device_opt = [
"apikey",
- "instance",
"region",
"limit",
"port",
diff --git a/tests/data/metadata/fence_ibm_vpc.xml b/tests/data/metadata/fence_ibm_vpc.xml
index 926efcaa0..ee7151673 100644
--- a/tests/data/metadata/fence_ibm_vpc.xml
+++ b/tests/data/metadata/fence_ibm_vpc.xml
@@ -8,12 +8,7 @@
<content type="string" />
<shortdesc lang="en">API Key</shortdesc>
</parameter>
- <parameter name="instance" unique="0" required="1">
- <getopt mixed="--instance=[instance]" />
- <content type="string" />
- <shortdesc lang="en">Cloud Instance</shortdesc>
- </parameter>
- <parameter name="limit" unique="0" required="1">
+ <parameter name="limit" unique="0" required="0">
<getopt mixed="--limit=[number]" />
<content type="string" default="50" />
<shortdesc lang="en">Number of nodes returned by API</shortdesc>

View File

@ -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 *

View 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)

View File

@ -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: 89%{?alphatag:.%{alphatag}}%{?dist} Release: 89%{?alphatag:.%{alphatag}}%{?dist}.2
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
@ -249,6 +249,9 @@ Patch105: bz1977588-4-fence_kubevirt-power-timeout-40s.patch
Patch106: bz1963163-fence_zvmip-add-ssl-tls-support.patch Patch106: bz1963163-fence_zvmip-add-ssl-tls-support.patch
Patch107: bz1977588-5-fence_kubevirt-get-namespace-from-context.patch Patch107: bz1977588-5-fence_kubevirt-get-namespace-from-context.patch
Patch108: bz2048857-fence_aws-botocore-bundled.patch Patch108: bz2048857-fence_aws-botocore-bundled.patch
Patch109: bz2083254-fence_ibm_vpc-fix-parameters.patch
Patch110: bz2086838-1-fence_apc-fence_ilo_moonshot-import-logging.patch
Patch111: bz2086838-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
@ -435,6 +438,9 @@ BuildRequires: python3-google-api-client python3-pip python3-wheel python3-jinja
%patch106 -p1 %patch106 -p1
%patch107 -p1 %patch107 -p1
%patch108 -p1 %patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -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
@ -1401,6 +1407,15 @@ Fence agent for IBM z/VM over IP.
%endif %endif
%changelog %changelog
* Tue May 17 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-89.2
- fence_apc/fence_ilo_moonshot/fence_lpar: add missing "import logging"
Resolves: rhbz#2086838
* Tue May 10 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-89.1
- fence_ibm_vpc: remove unused instance parameter and make limit
optional
Resolves: rhbz#2083254
* Fri Mar 4 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-89 * Fri Mar 4 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-89
- fence_ibm_vpc: new fence agent - fence_ibm_vpc: new fence agent
Resolves: rhbz#1728203 Resolves: rhbz#1728203