cluster: STABLE3 - fencing: Invalid initialization of default value for retry-on option
Marek Grác
marx at fedoraproject.org
Wed Nov 11 13:25:37 UTC 2009
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=2aee9d63481c3327150f5f68d2293972b6208b94
Commit: 2aee9d63481c3327150f5f68d2293972b6208b94
Parent: 048fc4ff023c3e90b6ecea84512bfb60da119da1
Author: Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate: Wed Nov 11 14:24:05 2009 +0100
Committer: Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Wed Nov 11 14:24:05 2009 +0100
fencing: Invalid initialization of default value for retry-on option
Problem introduced by:
commit 45ed9fd03c0718252f2ae418ffa7161198aa4688
Author: Marek 'marx' Grac <mgrac at redhat.com>
Date: Fri Nov 6 14:13:02 2009 +0100
fencing: New option --retry-on <N>
---
fence/agents/ilo/fence_ilo.py | 3 +--
fence/agents/lib/fencing.py.py | 11 ++++++++---
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/fence/agents/ilo/fence_ilo.py b/fence/agents/ilo/fence_ilo.py
index f0c7165..10d888c 100755
--- a/fence/agents/ilo/fence_ilo.py
+++ b/fence/agents/ilo/fence_ilo.py
@@ -56,8 +56,7 @@ def main():
device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug",
"action", "ipaddr", "login", "passwd", "passwd_script",
"ssl", "ribcl", "inet4_only", "inet6_only", "ipport",
- "power_timeout", "shell_timeout", "login_timeout", "power_wait",
- "retry_on" ]
+ "power_timeout", "shell_timeout", "login_timeout", "power_wait" ]
atexit.register(atexit_handler)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index fb87b13..a71f903 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -349,7 +349,7 @@ all_opt = {
"help" : "--missing-as-off Missing port returns OFF instead of failure",
"order" : 200 },
"retry_on" : {
- "getopt" : "r:",
+ "getopt" : "F:",
"longopt" : "retry-on",
"help" : "--retry-on <attempts> Count of attempts to retry power on",
"default" : "1",
@@ -566,6 +566,11 @@ def process_input(avail_opt):
def check_input(device_opt, opt):
global all_opt
+ ##
+ ## Add options which are available for every fence agent
+ #####
+ device_opt.append("retry_on")
+
options = dict(opt)
options["device_opt"] = device_opt
@@ -722,7 +727,7 @@ def fence_action(tn, options, set_power_fn, get_power_fn, get_outlet_list = None
print "Success: Already ON"
else:
power_on = False
- for i in range(1,int(options["-r"])):
+ for i in range(1,int(options["-F"])):
set_power_fn(tn, options)
time.sleep(int(options["-G"]))
if wait_power_status(tn, options, get_power_fn):
@@ -753,7 +758,7 @@ def fence_action(tn, options, set_power_fn, get_power_fn, get_outlet_list = None
options["-o"] = "on"
power_on = False
- for i in range(1,int(options["-r"])):
+ for i in range(1,int(options["-F"])):
set_power_fn(tn, options)
time.sleep(int(options["-G"]))
if wait_power_status(tn, options, get_power_fn) == 1:
More information about the cluster-commits
mailing list