cluster: RHEL55 - fencing: Unable to power on machine after applying patch
Marek Grác
marx at fedoraproject.org
Wed Nov 11 14:18:57 UTC 2009
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=c569e17fbdcc9812f4944171487dc220a0388fd6
Commit: c569e17fbdcc9812f4944171487dc220a0388fd6
Parent: d7b0e44f74c2a71004e4e1262af4a04f35f36a0a
Author: Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate: Wed Nov 11 15:01:19 2009 +0100
Committer: Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Wed Nov 11 15:18:29 2009 +0100
fencing: Unable to power on machine after applying patch
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/lib/fencing.py.py | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 879346d..fced23c 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -355,6 +355,8 @@ all_opt = {
"order" : 200 }
}
+common_opt = [ "retry_on" ]
+
class fspawn(pexpect.spawn):
def log_expect(self, options, pattern, timeout):
result = self.expect(pattern, timeout)
@@ -465,6 +467,12 @@ def metadata(avail_opt, options, docs):
def process_input(avail_opt):
global all_opt
+ global common_opt
+
+ ##
+ ## Add options which are available for every fence agent
+ #####
+ avail_opt.extend(common_opt)
##
## Set standard environment
@@ -564,11 +572,12 @@ def process_input(avail_opt):
######
def check_input(device_opt, opt):
global all_opt
+ global common_opt
##
## Add options which are available for every fence agent
#####
- device_opt.append("retry_on")
+ device_opt.extend(common_opt)
options = dict(opt)
options["device_opt"] = device_opt
@@ -738,7 +747,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["-F"])):
+ for i in range(1,1 + int(options["-F"])):
set_power_fn(tn, options)
time.sleep(int(options["-G"]))
if wait_power_status(tn, options, get_power_fn):
@@ -769,7 +778,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["-F"])):
+ for i in range(1,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