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

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