fence-agents: master - fence_scsi: --delay should be applied before attempt to test available devices

Marek GrĂ¡c marx at fedoraproject.org
Wed May 14 15:01:48 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=7b31dcce8c124f1ae396b5d63fa0e31af31b7ffa
Commit:        7b31dcce8c124f1ae396b5d63fa0e31af31b7ffa
Parent:        01efc45eec1a8142f5809984a94c175702685514
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Wed May 14 17:00:38 2014 +0200
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Wed May 14 17:00:38 2014 +0200

fence_scsi: --delay should be applied before attempt to test available devices

---
 fence/agents/scsi/Makefile.am   |    2 ++
 fence/agents/scsi/fence_scsi.py |    7 +++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/fence/agents/scsi/Makefile.am b/fence/agents/scsi/Makefile.am
index 89e3581..5722e18 100644
--- a/fence/agents/scsi/Makefile.am
+++ b/fence/agents/scsi/Makefile.am
@@ -10,6 +10,8 @@ sbin_SCRIPTS		= $(TARGET) fence_scsi_check
 
 man_MANS		= $(TARGET).8
 
+FENCE_TEST_ARGS         = -k 1
+
 fence_scsi_check: $(TARGET)
 	cp -s $^ $@
 
diff --git a/fence/agents/scsi/fence_scsi.py b/fence/agents/scsi/fence_scsi.py
index f837faa..d22bb86 100644
--- a/fence/agents/scsi/fence_scsi.py
+++ b/fence/agents/scsi/fence_scsi.py
@@ -10,6 +10,7 @@ import atexit
 import hashlib
 sys.path.append("@FENCEAGENTSLIBDIR@")
 from fencing import fail_usage, run_command, atexit_handler, check_input, process_input, show_docs, fence_action, all_opt
+from fencing import run_delay
 
 #BEGIN_VERSION_GENERATION
 RELEASE_VERSION=""
@@ -407,6 +408,8 @@ longer be able to write to the device(s). A manual reboot is required."
 	docs["vendorurl"] = ""
 	show_docs(options, docs)
 
+	run_delay(options)
+
 	# backward compatibility layer BEGIN
 	if "--logfile" in options:
 		try:
@@ -441,10 +444,6 @@ longer be able to write to the device(s). A manual reboot is required."
 		fail_usage("Failed: No devices found")
 	# Input control END
 
-	# backward compatibility layer
-	if "--delay" in options and options["--delay"].isdigit():
-		time.sleep(int(options["--delay"]))
-
 	result = fence_action(None, options, set_status, get_status)
 	sys.exit(result)
 


More information about the cluster-commits mailing list