Blame SOURCES/bz2152105-fencing-1-add-plug_separator.patch

776db4
From 90ea995038e560222f9345310f31a79b595a5219 Mon Sep 17 00:00:00 2001
776db4
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
776db4
Date: Thu, 24 Nov 2022 10:19:29 +0100
776db4
Subject: [PATCH 1/2] fencing: add plug_separator parameter to be able to
776db4
 specify one that isnt part of the plug name(s)
776db4
776db4
---
776db4
 lib/fencing.py.py | 9 ++++++++-
776db4
 1 file changed, 8 insertions(+), 1 deletion(-)
776db4
776db4
diff --git a/lib/fencing.py.py b/lib/fencing.py.py
776db4
index 940bd01d1..cf1c48e78 100644
776db4
--- a/lib/fencing.py.py
776db4
+++ b/lib/fencing.py.py
776db4
@@ -322,6 +322,13 @@
776db4
 		"help" : "-6, --inet6-only               Forces agent to use IPv6 addresses only",
776db4
 		"required" : "0",
776db4
 		"order" : 1},
776db4
+	"plug_separator" : {
776db4
+		"getopt" : ":",
776db4
+		"longopt" : "plug-separator",
776db4
+		"help" : "--plug-separator=[char]        Separator for plug parameter when specifying more than 1 plug",
776db4
+		"default" : ",",
776db4
+		"required" : "0",
776db4
+		"order" : 100},
776db4
 	"separator" : {
776db4
 		"getopt" : "C:",
776db4
 		"longopt" : "separator",
776db4
@@ -934,7 +941,7 @@ def fence_action(connection, options, set_power_fn, get_power_fn, get_outlet_lis
776db4
 
776db4
 	try:
776db4
 		if "--plug" in options:
776db4
-			options["--plugs"] = options["--plug"].split(",")
776db4
+			options["--plugs"] = options["--plug"].split(options["--plug-separator"])
776db4
 
776db4
 		## Process options that manipulate fencing device
776db4
 		#####
776db4
776db4
From 55e2a56b81ed2188dedfce07cc3155e2175183cd Mon Sep 17 00:00:00 2001
776db4
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
776db4
Date: Mon, 28 Nov 2022 12:40:00 +0100
776db4
Subject: [PATCH 2/2] fence_wti: increase login timeout to avoid random
776db4
 timeouts
776db4
776db4
---
776db4
 agents/wti/fence_wti.py           | 1 +
776db4
 tests/data/metadata/fence_wti.xml | 2 +-
776db4
 2 files changed, 2 insertions(+), 1 deletion(-)
776db4
776db4
diff --git a/agents/wti/fence_wti.py b/agents/wti/fence_wti.py
776db4
index 68640ae65..97cc66de2 100644
776db4
--- a/agents/wti/fence_wti.py
776db4
+++ b/agents/wti/fence_wti.py
776db4
@@ -178,6 +178,7 @@ def main():
776db4
 	atexit.register(atexit_handler)
776db4
 
776db4
 	all_opt["cmd_prompt"]["default"] = ["RSM>", "MPC>", "IPS>", "TPS>", "NBB>", "NPS>", "VMR>"]
776db4
+	all_opt["login_timeout"]["default"] = "10"
776db4
 
776db4
 	options = check_input(device_opt, process_input(device_opt))
776db4
 
776db4
diff --git a/tests/data/metadata/fence_wti.xml b/tests/data/metadata/fence_wti.xml
776db4
index 6bdccd2dc..8e15f4852 100644
776db4
--- a/tests/data/metadata/fence_wti.xml
776db4
+++ b/tests/data/metadata/fence_wti.xml
776db4
@@ -153,7 +153,7 @@
776db4
 	</parameter>
776db4
 	<parameter name="login_timeout" unique="0" required="0">
776db4
 		<getopt mixed="--login-timeout=[seconds]" />
776db4
-		<content type="second" default="5"  />
776db4
+		<content type="second" default="10"  />
776db4
 		<shortdesc lang="en">Wait X seconds for cmd prompt after login</shortdesc>
776db4
 	</parameter>
776db4
 	<parameter name="power_timeout" unique="0" required="0">