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

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