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

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