From ee97cfcb1107ac2ba247c0916cdba52984941fdf Mon Sep 17 00:00:00 2001 From: Oyvind Albrigtsen Date: Fri, 13 Jan 2023 13:51:01 +0100 Subject: [PATCH] - fence_scsi: skip key generation during validate-all action Resolves: rhbz#2160480 --- bz2160480-fence_scsi-fix-validate-all.patch | 30 +++++++++++++++++++++ fence-agents.spec | 8 +++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 bz2160480-fence_scsi-fix-validate-all.patch diff --git a/bz2160480-fence_scsi-fix-validate-all.patch b/bz2160480-fence_scsi-fix-validate-all.patch new file mode 100644 index 0000000..1aadca1 --- /dev/null +++ b/bz2160480-fence_scsi-fix-validate-all.patch @@ -0,0 +1,30 @@ +From a416a367a804f1e5abaf142c629fe6ab5572d3b6 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Thu, 12 Jan 2023 15:46:41 +0100 +Subject: [PATCH] fence_scsi: skip key generation during validate-all action + +--- + agents/scsi/fence_scsi.py | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py +index e33339614..f9e6823b2 100644 +--- a/agents/scsi/fence_scsi.py ++++ b/agents/scsi/fence_scsi.py +@@ -566,11 +566,12 @@ def main(): + or ("--key" in options and options["--key"])): + fail_usage("Failed: nodename or key is required", stop_after_error) + +- if not ("--key" in options and options["--key"]): +- options["--key"] = generate_key(options) ++ if options["--action"] != "validate-all": ++ if not ("--key" in options and options["--key"]): ++ options["--key"] = generate_key(options) + +- if options["--key"] == "0" or not options["--key"]: +- fail_usage("Failed: key cannot be 0", stop_after_error) ++ if options["--key"] == "0" or not options["--key"]: ++ fail_usage("Failed: key cannot be 0", stop_after_error) + + if "--key-value" in options\ + and (options["--key-value"] != "id" and options["--key-value"] != "hash"): diff --git a/fence-agents.spec b/fence-agents.spec index ca66f3c..7724182 100644 --- a/fence-agents.spec +++ b/fence-agents.spec @@ -60,7 +60,7 @@ Name: fence-agents Summary: Set of unified programs capable of host isolation ("fencing") Version: 4.10.0 -Release: 40%{?alphatag:.%{alphatag}}%{?dist} +Release: 41%{?alphatag:.%{alphatag}}%{?dist} License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/fence-agents Source0: https://fedorahosted.org/releases/f/e/fence-agents/%{name}-%{version}.tar.gz @@ -228,6 +228,7 @@ Patch33: bz2136191-fence_ibm_powervs-improve-defaults.patch Patch34: bz2138823-fence_virtd-update-manpage.patch Patch35: bz2144531-fence_virtd-warn-files-not-mode-600.patch Patch36: bz2149655-fence_virtd-update-fence_virt.conf-manpage.patch +Patch37: bz2160480-fence_scsi-fix-validate-all.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 @@ -375,6 +376,7 @@ BuildRequires: %{systemd_units} %patch34 -p1 %patch35 -p1 %patch36 -p1 +%patch37 -p1 # prevent compilation of something that won't get used anyway sed -i.orig 's|FENCE_ZVM=1|FENCE_ZVM=0|' configure.ac @@ -1441,6 +1443,10 @@ are located on corosync cluster nodes. %endif %changelog +* Fri Jan 13 2023 Oyvind Albrigtsen - 4.10.0-41 +- fence_scsi: skip key generation during validate-all action + Resolves: rhbz#2160480 + * Fri Dec 2 2022 Oyvind Albrigtsen - 4.10.0-40 - fence_virtd: add info about multiple uuid/ip entries to manpage