diff --git a/SOURCES/bz1647522-fence_scsi-fix-incorrect-SCSI-key-node-ID-10-or-higher.patch b/SOURCES/bz1647522-fence_scsi-fix-incorrect-SCSI-key-node-ID-10-or-higher.patch new file mode 100644 index 0000000..9560368 --- /dev/null +++ b/SOURCES/bz1647522-fence_scsi-fix-incorrect-SCSI-key-node-ID-10-or-higher.patch @@ -0,0 +1,24 @@ +From f77297b654586bf539e78957f26cae1d22c6f081 Mon Sep 17 00:00:00 2001 +From: Oyvind Albrigtsen +Date: Fri, 2 Nov 2018 09:24:56 +0100 +Subject: [PATCH] fence_scsi: fix incorrect SCSI key when node ID is 10 or + higher + + The last four digits of the SCSI key will be zero padded digit between 0000-0009. +--- + agents/scsi/fence_scsi.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py +index 2180d0c9..79ada4fa 100644 +--- a/agents/scsi/fence_scsi.py ++++ b/agents/scsi/fence_scsi.py +@@ -191,7 +191,7 @@ def get_cluster_id(options): + def get_node_id(options): + cmd = options["--corosync-cmap-path"] + " nodelist" + +- match = re.search(r".(\d).ring._addr \(str\) = " + options["--plug"] + "\n", run_cmd(options, cmd)["out"]) ++ match = re.search(r".(\d+).ring._addr \(str\) = " + options["--plug"] + "\n", run_cmd(options, cmd)["out"]) + return match.group(1) if match else fail_usage("Failed: unable to parse output of corosync-cmapctl or node does not exist") + + diff --git a/SPECS/fence-agents.spec b/SPECS/fence-agents.spec index dd57ce6..03c389f 100644 --- a/SPECS/fence-agents.spec +++ b/SPECS/fence-agents.spec @@ -66,7 +66,7 @@ Name: fence-agents Summary: Fence Agents for Red Hat Cluster Version: 4.2.1 -Release: 11%{?alphatag:.%{alphatag}}%{?dist} +Release: 11%{?alphatag:.%{alphatag}}%{?dist}.1 License: GPLv2+ and LGPLv2+ Group: System Environment/Base URL: https://github.com/ClusterLabs/fence-agents @@ -99,6 +99,7 @@ Patch13: bz1236395-3-fix-version.patch Patch14: bz1622229-1-fence_aliyun-list-instance-names.patch Patch15: bz1622229-2-fence_aliyun-correct-help-indentation.patch Patch16: bz1625164-fence_cisco_ucs-encode-POSTFIELDS.patch +Patch17: bz1647522-fence_scsi-fix-incorrect-SCSI-key-node-ID-10-or-higher.patch # bundle patches Patch1000: bz1568753-4-fence_gce-bundled-libs.patch Patch1001: bz1568753-5-%{oauth2client}-docs-build-fix.patch @@ -165,6 +166,7 @@ BuildRequires: python-six >= 1.6.1 %patch14 -p1 %patch15 -p1 %patch16 -p1 +%patch17 -p1 %ifarch x86_64 # bundles @@ -1112,6 +1114,10 @@ The fence-agents-zvm package contains a fence agent for z/VM hypervisors %endif %changelog +* Thu Nov 8 2018 Oyvind Albrigtsen - 4.2.1-11.1 +- fence_scsi: fix incorrect SCSI-key when node ID is 10 or higher + Resolves: rhbz#1647522 + * Tue Sep 4 2018 Oyvind Albrigtsen - 4.2.1-11 - fence_cisco_ucs: fix missing encode for POSTFIELDS Resolves: rhbz#1625164