diff --git a/RHEL-35663-1-lib-all-agents-use-r-for-regex.patch b/RHEL-35663-1-lib-all-agents-use-r-for-regex.patch deleted file mode 100644 index c0d5b44..0000000 --- a/RHEL-35663-1-lib-all-agents-use-r-for-regex.patch +++ /dev/null @@ -1,531 +0,0 @@ -From 55c7c987bd5e377db9bcaeb9a4f487397c12a128 Mon Sep 17 00:00:00 2001 -From: Oyvind Albrigtsen -Date: Wed, 20 Mar 2024 12:21:48 +0100 -Subject: [PATCH] lib/all agents: use r"" for all regular expressions to avoid - SyntaxWarning errors - ---- - agents/alom/fence_alom.py | 2 +- - agents/amt/fence_amt.py | 2 +- - agents/apc/fence_apc.py | 18 +++++++++--------- - agents/azure_arm/fence_azure_arm.py | 2 +- - agents/cdu/fence_cdu.py | 8 ++++---- - agents/cisco_ucs/fence_cisco_ucs.py | 14 +++++++------- - agents/gce/fence_gce.py | 6 +++--- - agents/ilo/fence_ilo.py | 2 +- - agents/ilo_mp/fence_ilo_mp.py | 2 +- - agents/ilo_ssh/fence_ilo_ssh.py | 2 +- - agents/ipmilan/fence_ipmilan.py | 6 +++--- - agents/ironic/fence_ironic.py | 4 ++-- - agents/lpar/fence_lpar.py | 10 +++++----- - agents/netio/fence_netio.py | 2 +- - agents/raritan/fence_raritan.py | 2 +- - agents/rhevm/fence_rhevm.py | 10 +++++----- - agents/rsa/fence_rsa.py | 2 +- - agents/wti/fence_wti.py | 6 +++--- - lib/azure_fence.py.py | 2 +- - lib/fencing.py.py | 12 ++++++------ - lib/fencing_snmp.py.py | 2 +- - 21 files changed, 58 insertions(+), 58 deletions(-) - -diff --git a/agents/alom/fence_alom.py b/agents/alom/fence_alom.py -index a8e216f3f..e593f16b5 100644 ---- a/agents/alom/fence_alom.py -+++ b/agents/alom/fence_alom.py -@@ -13,7 +13,7 @@ - def get_power_status(conn, options): - conn.send_eol("showplatform") - conn.log_expect(options["--command-prompt"], int(options["--shell-timeout"])) -- status = re.search("standby", conn.before.lower()) -+ status = re.search(r"standby", conn.before.lower()) - result = (status != None and "off" or "on") - - return result -diff --git a/agents/amt/fence_amt.py b/agents/amt/fence_amt.py -index 183bbc713..67e2112d3 100644 ---- a/agents/amt/fence_amt.py -+++ b/agents/amt/fence_amt.py -@@ -13,7 +13,7 @@ - - def get_power_status(_, options): - output = amt_run_command(options, create_command(options, "status")) -- match = re.search('Powerstate:[\\s]*(..)', str(output)) -+ match = re.search(r'Powerstate:[\s]*(..)', str(output)) - status = match.group(1) if match else None - - if status == None: -diff --git a/agents/apc/fence_apc.py b/agents/apc/fence_apc.py -index bc52aa244..805b83141 100644 ---- a/agents/apc/fence_apc.py -+++ b/agents/apc/fence_apc.py -@@ -36,21 +36,21 @@ def get_power_status(conn, options): - admin = 0 - switch = 0 - -- if None != re.compile('.* MasterSwitch plus.*', re.IGNORECASE | re.S).match(conn.before): -+ if None != re.compile(r'.* MasterSwitch plus.*', re.IGNORECASE | re.S).match(conn.before): - switch = 1 -- if None != re.compile('.* MasterSwitch plus 2', re.IGNORECASE | re.S).match(conn.before): -+ if None != re.compile(r'.* MasterSwitch plus 2', re.IGNORECASE | re.S).match(conn.before): - if "--switch" not in options: - fail_usage("Failed: You have to enter physical switch number") - else: - if "--switch" not in options: - options["--switch"] = "1" - -- if None == re.compile('.*Outlet Management.*', re.IGNORECASE | re.S).match(conn.before): -+ if None == re.compile(r'.*Outlet Management.*', re.IGNORECASE | re.S).match(conn.before): - version = 2 - else: - version = 3 - -- if None == re.compile('.*Outlet Control/Configuration.*', re.IGNORECASE | re.S).match(conn.before): -+ if None == re.compile(r'.*Outlet Control/Configuration.*', re.IGNORECASE | re.S).match(conn.before): - admin = 0 - else: - admin = 1 -@@ -109,26 +109,26 @@ def set_power_status(conn, options): - admin3 = 0 - switch = 0 - -- if None != re.compile('.* MasterSwitch plus.*', re.IGNORECASE | re.S).match(conn.before): -+ if None != re.compile(r'.* MasterSwitch plus.*', re.IGNORECASE | re.S).match(conn.before): - switch = 1 - ## MasterSwitch has different schema for on/off actions - action = { - 'on' : "1", - 'off': "3" - }[options["--action"]] -- if None != re.compile('.* MasterSwitch plus 2', re.IGNORECASE | re.S).match(conn.before): -+ if None != re.compile(r'.* MasterSwitch plus 2', re.IGNORECASE | re.S).match(conn.before): - if "--switch" not in options: - fail_usage("Failed: You have to enter physical switch number") - else: - if "--switch" not in options: - options["--switch"] = 1 - -- if None == re.compile('.*Outlet Management.*', re.IGNORECASE | re.S).match(conn.before): -+ if None == re.compile(r'.*Outlet Management.*', re.IGNORECASE | re.S).match(conn.before): - version = 2 - else: - version = 3 - -- if None == re.compile('.*Outlet Control/Configuration.*', re.IGNORECASE | re.S).match(conn.before): -+ if None == re.compile(r'.*Outlet Control/Configuration.*', re.IGNORECASE | re.S).match(conn.before): - admin2 = 0 - else: - admin2 = 1 -@@ -142,7 +142,7 @@ def set_power_status(conn, options): - else: - conn.send_eol("2") - conn.log_expect(options["--command-prompt"], int(options["--shell-timeout"])) -- if None == re.compile('.*2- Outlet Restriction.*', re.IGNORECASE | re.S).match(conn.before): -+ if None == re.compile(r'.*2- Outlet Restriction.*', re.IGNORECASE | re.S).match(conn.before): - admin3 = 0 - else: - admin3 = 1 -diff --git a/agents/azure_arm/fence_azure_arm.py b/agents/azure_arm/fence_azure_arm.py -index 0dca8f30d..227a7c2e2 100755 ---- a/agents/azure_arm/fence_azure_arm.py -+++ b/agents/azure_arm/fence_azure_arm.py -@@ -251,7 +251,7 @@ def main(): - except ImportError: - fail_usage("Azure Resource Manager Python SDK not found or not accessible") - except Exception as e: -- fail_usage("Failed: %s" % re.sub("^, ", "", str(e))) -+ fail_usage("Failed: %s" % re.sub(r"^, ", r"", str(e))) - - if "--network-fencing" in options: - # use off-action to quickly return off once network is fenced instead of -diff --git a/agents/cdu/fence_cdu.py b/agents/cdu/fence_cdu.py -index ba76e6d76..6373158e9 100644 ---- a/agents/cdu/fence_cdu.py -+++ b/agents/cdu/fence_cdu.py -@@ -51,11 +51,11 @@ def get_power_status(conn, options): - if options["api-version"] == "8": - # AA13 Arm-Console3 Wake On On Normal - # AA14 Master_Outlet_14 Wake On On Normal -- show_re = re.compile('(\w+)\s+(\S+)\s+(On|Idle On|Off|Wake On)\s+(On|Off)') -+ show_re = re.compile(r'(\w+)\s+(\S+)\s+(On|Idle On|Off|Wake On)\s+(On|Off)') - else: - # .A12 TowerA_Outlet12 On Idle On - # .A12 test-01 On Idle On -- show_re = re.compile('(\.\w+)\s+(\w+|\w+\W\w+)\s+(On|Off)\s+(On|Idle On|Off|Wake On)') -+ show_re = re.compile(r'(\.\w+)\s+(\w+|\w+\W\w+)\s+(On|Off)\s+(On|Idle On|Off|Wake On)') - for line in lines: - res = show_re.search(line) - if res != None: -@@ -89,7 +89,7 @@ def set_power_status(conn, options): - # else: - # .A12 TowerA_Outlet12 - # .A12 test-01 -- show_re = re.compile('(\S+)\s+(\w+|\w+\W\w+)\s+') -+ show_re = re.compile(r'(\S+)\s+(\w+|\w+\W\w+)\s+') - for line in lines: - res = show_re.search(line) - if res != None: -@@ -112,7 +112,7 @@ def get_version(conn, options): - conn.send("VERSION\r\n") - conn.log_expect(options["--command-prompt"], int(options["--shell-timeout"])) - lines = conn.before.split("\n") -- show_re = re.compile('Sentry Switched [PC]DU Version (\d)(.\d|)(\w)\r') -+ show_re = re.compile(r'Sentry Switched [PC]DU Version (\d)(.\d|)(\w)\r') - for line in lines: - res = show_re.search(line) - if res != None: -diff --git a/agents/cisco_ucs/fence_cisco_ucs.py b/agents/cisco_ucs/fence_cisco_ucs.py -index cada20d5e..bcfabdbaa 100644 ---- a/agents/cisco_ucs/fence_cisco_ucs.py -+++ b/agents/cisco_ucs/fence_cisco_ucs.py -@@ -8,13 +8,13 @@ - from fencing import * - from fencing import fail, EC_STATUS, EC_LOGIN_DENIED, run_delay - --RE_COOKIE = re.compile("(.*?)", re.IGNORECASE) --RE_STATE = re.compile("(.*?)", re.IGNORECASE) --RE_GET_NAME = re.compile("(.*?)", re.IGNORECASE) -+RE_GET_ID = re.compile(r"(.*?)", re.IGNORECASE) -+RE_STATE = re.compile(r"(.*?)", re.IGNORECASE) -+RE_GET_NAME = re.compile(r"(.*?)", re.IGNORECASE) - - def get_power_status(conn, options): - del conn -@@ -80,7 +80,7 @@ def send_command(opt, command, method="GET"): - if opt["--api-version"] == "auto": - opt["--api-version"] = "4" - res = send_command(opt, "") -- if re.search("Error", res): -+ if re.search(r"Error", res): - opt["--api-version"] = "3" - logging.debug("auto-detected API version: " + opt["--api-version"]) - -diff --git a/agents/rsa/fence_rsa.py b/agents/rsa/fence_rsa.py -index 79ed109eb..6efde753c 100644 ---- a/agents/rsa/fence_rsa.py -+++ b/agents/rsa/fence_rsa.py -@@ -16,7 +16,7 @@ def get_power_status(conn, options): - conn.send_eol("power state") - conn.log_expect(options["--command-prompt"], int(options["--shell-timeout"])) - -- match = re.compile("Power: (.*)", re.IGNORECASE).search(conn.before) -+ match = re.compile(r"Power: (.*)", re.IGNORECASE).search(conn.before) - if match != None: - status = match.group(1) - else: -diff --git a/agents/wti/fence_wti.py b/agents/wti/fence_wti.py -index ffa3d019c..9c16f364d 100644 ---- a/agents/wti/fence_wti.py -+++ b/agents/wti/fence_wti.py -@@ -27,7 +27,7 @@ def get_listing(conn, options, listing_command): - re_all = list(options["--command-prompt"]) - else: - re_all = [options["--command-prompt"]] -- re_next = re.compile("Enter: ", re.IGNORECASE) -+ re_next = re.compile(r"Enter: ", re.IGNORECASE) - re_all.append(re_next) - - result = conn.log_expect(re_all, int(options["--shell-timeout"])) -@@ -208,8 +208,8 @@ def main(): - conn.send("set binary\n") - conn.send("open %s -%s\n"%(options["--ip"], options["--ipport"])) - -- re_login = re.compile("(login: )|(Login Name: )|(username: )|(User Name :)", re.IGNORECASE) -- re_prompt = re.compile("|".join(["(" + x + ")" for x in options["--command-prompt"]]), re.IGNORECASE) -+ re_login = re.compile(r"(login: )|(Login Name: )|(username: )|(User Name :)", re.IGNORECASE) -+ re_prompt = re.compile(r"|".join(["(" + x + ")" for x in options["--command-prompt"]]), re.IGNORECASE) - - result = conn.log_expect([re_login, "Password: ", re_prompt], int(options["--shell-timeout"])) - if result == 0: -diff --git a/lib/azure_fence.py.py b/lib/azure_fence.py.py -index ab40b483a..fcbc40ab0 100644 ---- a/lib/azure_fence.py.py -+++ b/lib/azure_fence.py.py -@@ -49,7 +49,7 @@ def get_from_metadata(parameter): - return None - - def get_azure_resource(id): -- match = re.match('(/subscriptions/([^/]*)/resourceGroups/([^/]*))(/providers/([^/]*/[^/]*)/([^/]*))?((/([^/]*)/([^/]*))*)', id) -+ match = re.match(r'(/subscriptions/([^/]*)/resourceGroups/([^/]*))(/providers/([^/]*/[^/]*)/([^/]*))?((/([^/]*)/([^/]*))*)', id) - if not match: - fail_usage("{get_azure_resource} cannot parse resource id %s" % id) - -diff --git a/lib/fencing.py.py b/lib/fencing.py.py -index 3a60f53ee..511eb2689 100644 ---- a/lib/fencing.py.py -+++ b/lib/fencing.py.py -@@ -614,7 +614,7 @@ def metadata(options, avail_opt, docs): - sorted_list.sort(key=lambda x: (x[1]["order"], x[0])) - - if options["--action"] == "metadata": -- docs["longdesc"] = re.sub("\\\\f[BPIR]|\.P|\.TP|\.br\n", "", docs["longdesc"]) -+ docs["longdesc"] = re.sub(r"\\f[BPIR]|\.P|\.TP|\.br\n", r"", docs["longdesc"]) - - print("") - print(" -Date: Tue, 7 May 2024 15:36:09 +0200 -Subject: [PATCH] fence_hpblade/fence_mpath/fence_scsi: use r"" for all regular - expressions to avoid SyntaxWarning errors - ---- - agents/hpblade/fence_hpblade.py | 8 ++++---- - agents/mpath/fence_mpath.py | 2 +- - agents/scsi/fence_scsi.py | 10 +++++----- - 3 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/agents/hpblade/fence_hpblade.py b/agents/hpblade/fence_hpblade.py -index eb8f459b2..9381d2340 100644 ---- a/agents/hpblade/fence_hpblade.py -+++ b/agents/hpblade/fence_hpblade.py -@@ -33,10 +33,10 @@ def get_enclosure_type(conn, options): - def get_power_status(conn, options): - if options["enc_type"] == "superdome": - cmd_send = "parstatus -M -p " + options["--plug"] -- powrestr = "^partition:\\d\\s+:\\w+\\s+/(\\w+)\\s.*$" -+ powrestr = r"^partition:\d\s+:\w+\s+/(\w+)\s.*$" - else: - cmd_send = "show server status " + options["--plug"] -- powrestr = "^\\s*Power: (.*?)\\s*$" -+ powrestr = r"^\s*Power: (.*?)\s*$" - - conn.send_eol(cmd_send) - conn.log_expect(options["--command-prompt"], int(options["--shell-timeout"])) -@@ -78,10 +78,10 @@ def get_instances_list(conn, options): - outlets = {} - if options["enc_type"] == "superdome": - cmd_send = "parstatus -P -M" -- listrestr = "^partition:(\\d+)\\s+:\\w+\\s+/(\\w+)\\s+:OK.*?:(\\w+)\\s*$" -+ listrestr = r"^partition:(\d+)\s+:\w+\s+/(\w+)\s+:OK.*?:(\w+)\s*$" - else: - cmd_send = "show server list" -- listrestr = "^\\s*(\\d+)\\s+(.*?)\\s+(.*?)\\s+OK\\s+(.*?)\\s+(.*?)\\s*$" -+ listrestr = r"^\s*(\d+)\s+(.*?)\s+(.*?)\s+OK\s+(.*?)\s+(.*?)\s*$" - - conn.send_eol(cmd_send) - conn.log_expect(options["--command-prompt"], int(options["--shell-timeout"])) -diff --git a/agents/mpath/fence_mpath.py b/agents/mpath/fence_mpath.py -index 0e5d9ed30..58450c2ce 100644 ---- a/agents/mpath/fence_mpath.py -+++ b/agents/mpath/fence_mpath.py -@@ -331,7 +331,7 @@ def main(): - if not ("--devices" in options and options["--devices"]): - fail_usage("Failed: No devices found") - -- options["devices"] = [d for d in re.split("\s*,\s*|\s+", options["--devices"].strip()) if d] -+ options["devices"] = [d for d in re.split(r"\s*,\s*|\s+", options["--devices"].strip()) if d] - # Input control END - - result = fence_action(None, options, set_status, get_status) -diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py -index 5cb5dbee9..a1598411c 100644 ---- a/agents/scsi/fence_scsi.py -+++ b/agents/scsi/fence_scsi.py -@@ -236,11 +236,11 @@ def get_node_id(options): - cmd = options["--corosync-cmap-path"] + " nodelist" - out = run_cmd(options, cmd)["out"] - -- match = re.search(r".(\d+).name \(str\) = " + options["--plug"] + "\n", out) -+ match = re.search(r".(\d+).name \(str\) = " + options["--plug"] + r"\n", out) - - # try old format before failing - if not match: -- match = re.search(r".(\d+).ring._addr \(str\) = " + options["--plug"] + "\n", out) -+ match = re.search(r".(\d+).ring._addr \(str\) = " + options["--plug"] + r"\n", out) - - return match.group(1) if match else fail_usage("Failed: unable to parse output of corosync-cmapctl or node does not exist") - -@@ -295,7 +295,7 @@ def dev_write(dev, options): - fail_usage("Failed: Cannot open file \""+ file_path + "\"") - f.seek(0) - out = f.read() -- if not re.search(r"^" + dev + "\s+", out, flags=re.MULTILINE): -+ if not re.search(r"^" + dev + r"\s+", out, flags=re.MULTILINE): - f.write(dev + "\n") - f.close() - -@@ -613,10 +613,10 @@ def main(): - - options["--key"] = options["--key"].lstrip('0') - -- if not ("--devices" in options and [d for d in re.split("\s*,\s*|\s+", options["--devices"].strip()) if d]): -+ if not ("--devices" in options and [d for d in re.split(r"\s*,\s*|\s+", options["--devices"].strip()) if d]): - options["devices"] = get_shared_devices(options) - else: -- options["devices"] = [d for d in re.split("\s*,\s*|\s+", options["--devices"].strip()) if d] -+ options["devices"] = [d for d in re.split(r"\s*,\s*|\s+", options["--devices"].strip()) if d] - - if not options["devices"]: - fail_usage("Failed: No devices found") diff --git a/fence-agents.spec b/fence-agents.spec index 782786f..a6ad07f 100644 --- a/fence-agents.spec +++ b/fence-agents.spec @@ -12,8 +12,8 @@ Name: fence-agents Summary: Set of unified programs capable of host isolation ("fencing") -Version: 4.13.1 -Release: 8%{?alphatag:.%{alphatag}}%{?dist} +Version: 4.15.0 +Release: 1%{?alphatag:.%{alphatag}}%{?dist} License: GPL-2.0-or-later AND LGPL-2.0-or-later URL: https://github.com/ClusterLabs/fence-agents Source0: https://fedorahosted.org/releases/f/e/fence-agents/%{name}-%{version}.tar.gz @@ -103,8 +103,6 @@ Patch4: ha-cloud-support-google.patch Patch5: bundled-kubevirt.patch Patch6: bundled-pycurl.patch Patch7: bundled-suds.patch -Patch8: RHEL-35663-1-lib-all-agents-use-r-for-regex.patch -Patch9: RHEL-35663-2-fence_hpblade-fence_mpath-fence_scsi-use-r-for-regex.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 @@ -372,7 +370,7 @@ This package contains support files including the Python fencing library. %dir %attr (1755, root, root) %{_var}/run/%{name} %endif %dir %{_usr}/lib/%{name} -%{_usr}/lib/%{name}/support/common +%{_usr}/lib/%{name}/support/common/lib* %exclude %{_usr}/lib/%{name}/support/common/share %ifarch x86_64 @@ -426,7 +424,8 @@ Provides: bundled(python3-rsa) = 4.9 Support libraries for Fence Agents. %files -n ha-cloud-support %dir %{_usr}/lib/%{name} -%{_usr}/lib/%{name}/support +%{_usr}/lib/%{name}/support/*/lib +%{_usr}/lib/%{name}/support/aliyun/aliyun-cli %exclude %{_usr}/lib/%{name}/support/common %exclude %{_usr}/lib/%{name}/support/kubevirt %endif @@ -667,8 +666,8 @@ BuildArch: noarch Fence agent for ePowerSwitch 8M+ power switches that are accessed via the HTTP(s) protocol. %files eps -%{_sbindir}/fence_eps -%{_mandir}/man8/fence_eps.8* +%{_sbindir}/fence_eps* +%{_mandir}/man8/fence_eps*.8* %ifarch x86_64 %package gce @@ -903,7 +902,7 @@ Fence agent for KubeVirt platform. %{_sbindir}/fence_kubevirt %{_mandir}/man8/fence_kubevirt.8* # bundled libraries -%{_usr}/lib/%{name}/support/kubevirt +%{_usr}/lib/%{name}/support/kubevirt/lib %exclude %{_usr}/lib/%{name}/support/kubevirt/README %package lpar @@ -1179,6 +1178,10 @@ are located on corosync cluster nodes. %endif %changelog +* Tue Jul 2 2024 Oyvind Albrigtsen - 4.15.0-1 +- new upstream release + Resolves: RHEL-45835 + * Mon Jun 24 2024 Troy Dawson - 4.13.1-8 - Bump release for June 2024 mass rebuild diff --git a/gating.yaml b/gating.yaml index 648918d..4ca9235 100644 --- a/gating.yaml +++ b/gating.yaml @@ -1,6 +1,6 @@ --- !Policy product_versions: - - rhel-9 + - rhel-10 decision_context: osci_compose_gate rules: - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/sources b/sources index 27d76d1..95a404b 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (fence-agents-4.13.1.tar.gz) = ea3d7effea14b19a9a70a954f052469577a7a8f83ab380a23e83e888067f38b04a0b9142216c05c0965a2777e4804b9a2a3d839ae3fc8136f1c3282f325e3b8b +SHA512 (fence-agents-4.15.0.tar.gz) = 16871880b5d2286145608dd43ec8943b079238774de7539b0e86bbf1d9b2f1d4e3e17632bcb078b49aafbe9a4b2efab4c24196d9d0df9b318e26092465acd67b SHA512 (requirements-common.txt) = 27efb8655b5cb949ddbdaa1ef8bb0787349ad3173ae46d47110779a7588f6b03e3a6bd717cc7b9182dda3a0ed474715da9ca378031fed288fb9fb4dcae4b15f1 SHA512 (requirements-aliyun.txt) = 74ae6b3f7bb0c25b532f606d7dea3cf4e3a0d1c1abdce78d01e2ab8e81c9f346162142679bad884b2fa110d4d6a8c4692b678017eb1fc7d092907c0c063b1c79 SHA512 (requirements-aws.txt) = ca39604d09f4b05589ddaa437be13b7f5d1868218745df107564d73a6c32efb7e4761436197a69653edc47a78f40dd7d5f0894935ec21b8f23b7c7bc71dfd0d1