Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=2b80f70d…
Commit: 2b80f70df2e225492e96b592ffca690046a9e6f7
Parent: d27c5cc8fcf108ee8eb5b434df898ee2137fbaf2
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Thu Jun 26 16:02:24 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Thu Jun 26 16:02:24 2014 +0200
fencing: Fix problems with options without short getopt
---
fence/agents/lib/fencing.py.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 0584b7e..4520ea8 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -559,9 +559,10 @@ def process_input(avail_opt):
getopt_string = ""
longopt_list = []
for k in avail_opt:
- if all_opt.has_key(k):
+ if all_opt.has_key(k) and all_opt[k]["getopt"] != ":":
+ # getopt == ":" means that opt is without short getopt, but has value
getopt_string += all_opt[k]["getopt"]
- else:
+ elif not all_opt.has_key(k):
fail_usage("Parse error: unknown option '"+k+"'")
if all_opt.has_key(k) and all_opt[k].has_key("longopt"):
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=a5ce29b7…
Commit: a5ce29b7dd9b07f0e5038b197a8260a313b7cadd
Parent: b972ec00ea7e50664aa684efa7a2873d98a11c48
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Thu Jun 26 14:23:45 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Thu Jun 26 14:23:45 2014 +0200
fencing: Delay should be used also with "disable"
Previously, delay was used only with off and reboot actions.
Resolves: rhbz#641632
---
fence/agents/lib/fencing.py.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 775b567..eeb0a3f 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -892,7 +892,7 @@ def fence_login(options, re_login_string = "(login\s*: )|(Login Name: )|(userna
## 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"]:
+ if options["-o"] in ["off", "reboot", "disable"]:
time.sleep(int(options["-f"]))
try: