From ce1a35023b8ade1bf08e7d568a8184824f8493ff Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 28 2021 04:20:38 +0000 Subject: import fence-agents-4.2.1-79.el8 --- diff --git a/SOURCES/bz1969953-fence_gce-3-fix-httplib2-import.patch b/SOURCES/bz1969953-fence_gce-3-fix-httplib2-import.patch new file mode 100644 index 0000000..a915239 --- /dev/null +++ b/SOURCES/bz1969953-fence_gce-3-fix-httplib2-import.patch @@ -0,0 +1,18 @@ +--- a/agents/gce/fence_gce.py 2021-10-19 10:29:17.000000000 +0000 ++++ b/agents/gce/fence_gce.py 2021-10-26 15:26:11.348781027 +0000 +@@ -1,7 +1,6 @@ + #!@PYTHON@ -tt + + import atexit +-import httplib2 + import logging + import os + import sys +@@ -19,6 +18,7 @@ + from fencing import fail_usage, run_delay, all_opt, atexit_handler, check_input, process_input, show_docs, fence_action + try: + sys.path.insert(0, '/usr/lib/fence-agents/bundled/google') ++ import httplib2 + import googleapiclient.discovery + import socks + try: diff --git a/SOURCES/bz2010710-1-fence_amt_ws-fix-or-dead-code.patch b/SOURCES/bz2010710-1-fence_amt_ws-fix-or-dead-code.patch new file mode 100644 index 0000000..bdbeab0 --- /dev/null +++ b/SOURCES/bz2010710-1-fence_amt_ws-fix-or-dead-code.patch @@ -0,0 +1,22 @@ +From 06855a8227fa91f6216119daa3d32d5858c62837 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Mon, 27 Sep 2021 12:05:41 +0200 +Subject: [PATCH] fence_amt_ws: fix "or" causing dead code + +--- + agents/amt_ws/fence_amt_ws.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/agents/amt_ws/fence_amt_ws.py b/agents/amt_ws/fence_amt_ws.py +index 23c8a61a4..122cec309 100755 +--- a/agents/amt_ws/fence_amt_ws.py ++++ b/agents/amt_ws/fence_amt_ws.py +@@ -148,7 +148,7 @@ def set_boot_order(_, client, options): + + if options["--boot-option"] == "pxe": + device = "Intel(r) AMT: Force PXE Boot" +- elif options["--boot-option"] == "hd" or "hdsafe": ++ elif options["--boot-option"] in ["hd", "hdsafe"]: + device = "Intel(r) AMT: Force Hard-drive Boot" + elif options["--boot-option"] == "cd": + device = "Intel(r) AMT: Force CD/DVD Boot" diff --git a/SOURCES/bz2010710-2-fence_amt_ws-boot-option.patch b/SOURCES/bz2010710-2-fence_amt_ws-boot-option.patch new file mode 100644 index 0000000..dd37fef --- /dev/null +++ b/SOURCES/bz2010710-2-fence_amt_ws-boot-option.patch @@ -0,0 +1,32 @@ +From 9812473270e9a404c632358c1debfa4a1fb440fe Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Wed, 20 Oct 2021 15:46:42 +0200 +Subject: [PATCH] fence_amt_ws: fix --boot-option (choices are uppercased while + getting parsed) + +--- + agents/amt_ws/fence_amt_ws.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/agents/amt_ws/fence_amt_ws.py b/agents/amt_ws/fence_amt_ws.py +index 122cec309..5e7452a97 100755 +--- a/agents/amt_ws/fence_amt_ws.py ++++ b/agents/amt_ws/fence_amt_ws.py +@@ -146,13 +146,13 @@ def set_boot_order(_, client, options): + wsman = 'http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd' + namespace = CIM_BootConfigSetting + +- if options["--boot-option"] == "pxe": ++ if options["--boot-option"] == "PXE": + device = "Intel(r) AMT: Force PXE Boot" +- elif options["--boot-option"] in ["hd", "hdsafe"]: ++ elif options["--boot-option"] in ["HD", "HDSAFE"]: + device = "Intel(r) AMT: Force Hard-drive Boot" +- elif options["--boot-option"] == "cd": ++ elif options["--boot-option"] == "CD": + device = "Intel(r) AMT: Force CD/DVD Boot" +- elif options["--boot-option"] == "diag": ++ elif options["--boot-option"] == "DIAG": + device = "Intel(r) AMT: Force Diagnostic Boot" + else: + logging.error('Boot device: %s not supported.', \ diff --git a/SOURCES/bz2010710-fence_amt_ws-fix-or-dead-code.patch b/SOURCES/bz2010710-fence_amt_ws-fix-or-dead-code.patch deleted file mode 100644 index bdbeab0..0000000 --- a/SOURCES/bz2010710-fence_amt_ws-fix-or-dead-code.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 06855a8227fa91f6216119daa3d32d5858c62837 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Mon, 27 Sep 2021 12:05:41 +0200 -Subject: [PATCH] fence_amt_ws: fix "or" causing dead code - ---- - agents/amt_ws/fence_amt_ws.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/agents/amt_ws/fence_amt_ws.py b/agents/amt_ws/fence_amt_ws.py -index 23c8a61a4..122cec309 100755 ---- a/agents/amt_ws/fence_amt_ws.py -+++ b/agents/amt_ws/fence_amt_ws.py -@@ -148,7 +148,7 @@ def set_boot_order(_, client, options): - - if options["--boot-option"] == "pxe": - device = "Intel(r) AMT: Force PXE Boot" -- elif options["--boot-option"] == "hd" or "hdsafe": -+ elif options["--boot-option"] in ["hd", "hdsafe"]: - device = "Intel(r) AMT: Force Hard-drive Boot" - elif options["--boot-option"] == "cd": - device = "Intel(r) AMT: Force CD/DVD Boot" diff --git a/SPECS/fence-agents.spec b/SPECS/fence-agents.spec index f7a92c2..03bf23f 100644 --- a/SPECS/fence-agents.spec +++ b/SPECS/fence-agents.spec @@ -32,7 +32,7 @@ Name: fence-agents Summary: Set of unified programs capable of host isolation ("fencing") Version: 4.2.1 -Release: 78%{?alphatag:.%{alphatag}}%{?dist} +Release: 79%{?alphatag:.%{alphatag}}%{?dist} License: GPLv2+ and LGPLv2+ Group: System Environment/Base URL: https://github.com/ClusterLabs/fence-agents @@ -143,7 +143,9 @@ Patch94: bz1728203-bz1874862-fence_ibm_vpc-fence_ibm_powervs.patch Patch95: bz1969953-fence_gce-1-add-proxy-support.patch Patch96: bz1969953-fence_gce-2-bundled.patch Patch97: bz1470827-all-agents-log-exceptions-fail.patch -Patch98: bz2010710-fence_amt_ws-fix-or-dead-code.patch +Patch98: bz2010710-1-fence_amt_ws-fix-or-dead-code.patch +Patch99: bz2010710-2-fence_amt_ws-boot-option.patch +Patch100: bz1969953-fence_gce-3-fix-httplib2-import.patch %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 lpar mpath redfish rhevm rsa rsb sbd scsi vmware_rest vmware_soap wti @@ -326,6 +328,8 @@ BuildRequires: python3-pip %patch96 -p1 -F2 %patch97 -p1 %patch98 -p1 +%patch99 -p1 +%patch100 -p1 # prevent compilation of something that won't get used anyway sed -i.orig 's|FENCE_ZVM=1|FENCE_ZVM=0|' configure.ac @@ -1231,16 +1235,16 @@ Fence agent for IBM z/VM over IP. %endif %changelog -* Tue Oct 19 2021 Oyvind Albrigtsen - 4.2.1-78 -- all agents: log exceptions when failing - Resolves: rhbz#1470827 +* Wed Oct 27 2021 Oyvind Albrigtsen - 4.2.1-79 - fence_amt_ws: fix "or" causing dead code Resolves: rhbz#2010710 - -* Tue Sep 7 2021 Oyvind Albrigtsen - 4.2.1-77 - fence_gce: add proxy support Resolves: rhbz#1969953 +* Tue Oct 19 2021 Oyvind Albrigtsen - 4.2.1-78 +- all agents: log exceptions when failing + Resolves: rhbz#1470827 + * Thu Sep 2 2021 Oyvind Albrigtsen - 4.2.1-76 - fence_ibm_vpc/fence_ibm_powervs: new fence agents Resolves: rhbz#1728203, rhbz#1874862