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

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