fence-agents: master - fence_vmware_soap: --delay is not respected

Marek GrĂ¡c marx at fedoraproject.org
Fri Jan 10 14:55:58 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=530e97f05e43bdd5bef9d24c75d4cc3057a491e8
Commit:        530e97f05e43bdd5bef9d24c75d4cc3057a491e8
Parent:        626035de9ad2dab222f79814afa6a1820d252a8a
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Fri Jan 10 15:54:49 2014 +0100
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Fri Jan 10 15:54:49 2014 +0100

fence_vmware_soap: --delay is not respected

Because fence agent do not use standard login process, support for the --delay has to be added.
---
 fence/agents/vmware_soap/fence_vmware_soap.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py
index 98ac011..acfdcbb 100644
--- a/fence/agents/vmware_soap/fence_vmware_soap.py
+++ b/fence/agents/vmware_soap/fence_vmware_soap.py
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 
-import sys, exceptions
+import sys, exceptions, time
 import shutil, tempfile
 sys.path.append("@FENCEAGENTSLIBDIR@")
 
@@ -15,6 +15,9 @@ BUILD_DATE="April, 2011"
 #END_VERSION_GENERATION
 
 def soap_login(options):
+	if options["-o"] in ["off", "reboot"]:
+		time.sleep(int(options["--delay"]))
+
 	if options.has_key("--ssl"):
 		url = "https://"
 	else:


More information about the cluster-commits mailing list