Blame SOURCES/bz1654968-fence_scsi-fix-incorrect-SCSI-key-node-ID-10-or-higher.patch

674a4f
From f77297b654586bf539e78957f26cae1d22c6f081 Mon Sep 17 00:00:00 2001
674a4f
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
674a4f
Date: Fri, 2 Nov 2018 09:24:56 +0100
674a4f
Subject: [PATCH] fence_scsi: fix incorrect SCSI key when node ID is 10 or
674a4f
 higher
674a4f
674a4f
  The last four digits of the SCSI key will be zero padded digit between 0000-0009.
674a4f
---
674a4f
 agents/scsi/fence_scsi.py | 2 +-
674a4f
 1 file changed, 1 insertion(+), 1 deletion(-)
674a4f
674a4f
diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py
674a4f
index 2180d0c9..79ada4fa 100644
674a4f
--- a/agents/scsi/fence_scsi.py
674a4f
+++ b/agents/scsi/fence_scsi.py
674a4f
@@ -191,7 +191,7 @@ def get_cluster_id(options):
674a4f
 def get_node_id(options):
674a4f
 	cmd = options["--corosync-cmap-path"] + " nodelist"
674a4f
 
674a4f
-	match = re.search(r".(\d).ring._addr \(str\) = " + options["--plug"] + "\n", run_cmd(options, cmd)["out"])
674a4f
+	match = re.search(r".(\d+).ring._addr \(str\) = " + options["--plug"] + "\n", run_cmd(options, cmd)["out"])
674a4f
 	return match.group(1) if match else fail_usage("Failed: unable to parse output of corosync-cmapctl or node does not exist")
674a4f
 
674a4f