Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=b5f... Commit: b5fe319735a628d153c09098cea0f90df8b62ead Parent: 9fb1a85034eb8f94a766ba9766a75924947f5e77 Author: Marek 'marx' Grac mgrac@redhat.com AuthorDate: Mon Mar 19 16:45:23 2012 +0100 Committer: Marek 'marx' Grac mgrac@redhat.com CommitterDate: Mon Mar 19 16:45:23 2012 +0100
fence agents: Using "delay" option can ends with timeout problems
Resolves: rhbz#804169 --- fence/agents/lib/fencing.py.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py index e93f59a..02a01be 100644 --- a/fence/agents/lib/fencing.py.py +++ b/fence/agents/lib/fencing.py.py @@ -787,8 +787,6 @@ def fence_action(tn, options, set_power_fn, get_power_fn, get_outlet_list = None print o + options["-C"] + alias return
- if options["-o"] in ["off", "reboot"]: - time.sleep(int(options["-f"])) status = get_power_fn(tn, options)
if status != "on" and status != "off": @@ -871,6 +869,11 @@ def fence_login(options): else: login_eol = "\r\n"
+ ## Do the delay of the fence device before logging in + ## Delay is important for two-node clusters fencing but we do not need to delay 'status' operations + if options["-o"] in ["off", "reboot"]: + time.sleep(int(options["-f"])) + try: re_login = re.compile("(login\s*: )|(Login Name: )|(username: )|(User Name :)", re.IGNORECASE) re_pass = re.compile("(password)|(pass phrase)", re.IGNORECASE)
cluster-commits@lists.fedorahosted.org