Blame SOURCES/bz2122944-1-fence_vmware_soap-set-timeout-cleanup-tmp-dirs.patch

8639df
From d4d2dd5066b62210a05c1256c6aee39609e3a974 Mon Sep 17 00:00:00 2001
8639df
From: Thanasis Katsios <thkatsios@gmail.com>
8639df
Date: Mon, 1 Nov 2021 12:31:36 +0200
8639df
Subject: [PATCH 1/3] fence_vmware_soap: Use --login-timeout option
8639df
8639df
Fixes issue #446.
8639df
---
8639df
 agents/vmware_soap/fence_vmware_soap.py | 3 ++-
8639df
 1 file changed, 2 insertions(+), 1 deletion(-)
8639df
8639df
diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py
8639df
index a7f08b3d6..034695931 100644
8639df
--- a/agents/vmware_soap/fence_vmware_soap.py
8639df
+++ b/agents/vmware_soap/fence_vmware_soap.py
8639df
@@ -57,7 +57,8 @@ def soap_login(options):
8639df
 
8639df
 	try:
8639df
 		headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : "vim25"}
8639df
-		conn = Client(url + "/vimService.wsdl", location=url, transport=RequestsTransport(verify=verify), headers=headers)
8639df
+		login_timeout = int(options["--login-timeout"])
8639df
+		conn = Client(url + "/vimService.wsdl", location=url, transport=RequestsTransport(verify=verify), headers=headers, timeout=login_timeout)
8639df
 
8639df
 		mo_ServiceInstance = Property('ServiceInstance')
8639df
 		mo_ServiceInstance._type = 'ServiceInstance'
8639df
8639df
From 1e8f0d7582c7768149269f8d002d71b2febbdda0 Mon Sep 17 00:00:00 2001
8639df
From: Thanasis Katsios <thkatsios@gmail.com>
8639df
Date: Tue, 2 Nov 2021 16:52:59 +0200
8639df
Subject: [PATCH 2/3] Set timeout to 60s when disable-timeouts is used
8639df
8639df
---
8639df
 agents/vmware_soap/fence_vmware_soap.py | 2 +-
8639df
 1 file changed, 1 insertion(+), 1 deletion(-)
8639df
8639df
diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py
8639df
index 034695931..38101352e 100644
8639df
--- a/agents/vmware_soap/fence_vmware_soap.py
8639df
+++ b/agents/vmware_soap/fence_vmware_soap.py
8639df
@@ -57,7 +57,7 @@ def soap_login(options):
8639df
 
8639df
 	try:
8639df
 		headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : "vim25"}
8639df
-		login_timeout = int(options["--login-timeout"])
8639df
+		login_timeout = 60 if "--disable-timeout" in options and options["--disable-timeout"] != "false" else int(options["--login-timeout"])
8639df
 		conn = Client(url + "/vimService.wsdl", location=url, transport=RequestsTransport(verify=verify), headers=headers, timeout=login_timeout)
8639df
 
8639df
 		mo_ServiceInstance = Property('ServiceInstance')
8639df
8639df
From 8094c8a5a06adf0bd891d4fddcc0b72861a0947e Mon Sep 17 00:00:00 2001
8639df
From: Thanasis Katsios <thkatsios@gmail.com>
8639df
Date: Tue, 2 Nov 2021 18:51:02 +0200
8639df
Subject: [PATCH 3/3] Support disable-timeout simplification
8639df
8639df
---
8639df
 agents/vmware_soap/fence_vmware_soap.py | 2 +-
8639df
 1 file changed, 1 insertion(+), 1 deletion(-)
8639df
8639df
diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py
8639df
index 38101352e..2cd45e0b3 100644
8639df
--- a/agents/vmware_soap/fence_vmware_soap.py
8639df
+++ b/agents/vmware_soap/fence_vmware_soap.py
8639df
@@ -57,7 +57,7 @@ def soap_login(options):
8639df
 
8639df
 	try:
8639df
 		headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : "vim25"}
8639df
-		login_timeout = 60 if "--disable-timeout" in options and options["--disable-timeout"] != "false" else int(options["--login-timeout"])
8639df
+		login_timeout = int(options["--login-timeout"]) or 60
8639df
 		conn = Client(url + "/vimService.wsdl", location=url, transport=RequestsTransport(verify=verify), headers=headers, timeout=login_timeout)
8639df
 
8639df
 		mo_ServiceInstance = Property('ServiceInstance')