Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 35f94eace1e0b3b1c4b9da50d26ba8a1fdbf0716
Parent: 4f83d6506976ea57f97eb776aa22e46af15edd9d
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Wed Jan 20 18:56:11 2010 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Fri Feb 5 18:53:15 2010 +0100
fence_ilo: Add power-wait option to solve ilo2 v1.70 problem
Default behaviour was not changed, it is possible to use -G <seconds>.
ilo2 v1.70+ problem can be solved with '-G 5'
rhbz#545682
---
fence/agents/ilo/fence_ilo.py | 2 +-
fence/agents/lib/fencing.py.py | 6 ++++++
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/fence/agents/ilo/fence_ilo.py b/fence/agents/ilo/fence_ilo.py
index 6513e2a..8a34fb0 100755
--- a/fence/agents/ilo/fence_ilo.py
+++ b/fence/agents/ilo/fence_ilo.py
@@ -57,7 +57,7 @@ def set_power_status(conn, options):
def main():
device_opt = [ "help", "version", "agent",
"quiet", "verbose", "debug",
"action", "ipaddr", "login", "passwd",
"passwd_script",
- "ssl", "ribcl" ]
+ "ssl", "ribcl", "power_wait" ]
options = check_input(device_opt, process_input(device_opt))
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 461edb2..6e0e99c 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -137,6 +137,10 @@ all_opt = {
"getopt" : "s:",
"help" : "-s <id> Name of the managed system",
"order" : 1 },
+ "power_wait" : {
+ "getopt" : "G:",
+ "help" : "-G <seconds> Wait X seconds after issuing
ON/OFF",
+ "order" : 1 },
"test" : {
"getopt" : "T",
"help" : "",
@@ -360,6 +364,8 @@ def fence_action(tn, options, set_power_fn, get_power_fn):
set_power_fn(tn, options)
if wait_power_status(tn, options, get_power_fn) == 0:
fail(EC_WAITING_OFF)
+ if options.has_key("-G"):
+ time.sleep(int(options["-G"]))
options["-o"] = "on"
set_power_fn(tn, options)
if wait_power_status(tn, options, get_power_fn) == 0: