cluster: RHEL55 - fencing: Invalid initialization of default value for retry-on option
Marek Grác
marx at fedoraproject.org
Wed Nov 11 14:18:55 UTC 2009
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=d7b0e44f74c2a71004e4e1262af4a04f35f36a0a
Commit: d7b0e44f74c2a71004e4e1262af4a04f35f36a0a
Parent: d5d89301d14fa72a7123b159b1d1aa5c0be24bb2
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 15:18:14 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 3e45c84..cf2993d 100755
--- a/fence/agents/ilo/fence_ilo.py
+++ b/fence/agents/ilo/fence_ilo.py
@@ -58,8 +58,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 fbda2a8..879346d 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -348,7 +348,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",
@@ -565,6 +565,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
@@ -733,7 +738,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):
@@ -764,7 +769,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