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

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