Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=23850c66d... Commit: 23850c66d9caf7d61dc4217ffae66a79b516fdff Parent: 3d9e3cf41f11da188e3f927ceb4b9f39435bc0a9 Author: Marek 'marx' Grac mgrac@redhat.com AuthorDate: Fri Jun 7 12:57:29 2013 +0200 Committer: Marek 'marx' Grac mgrac@redhat.com CommitterDate: Fri Jun 7 13:02:25 2013 +0200
fencing: Actions to set power status are not working properly for fence agents without --plug
The bug was introduced when support for multiple ports was added. commit 0097e806545d722270b739f31a754d65994b18c9 --- fence/agents/lib/fencing.py.py | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py index 1424111..8be5f31 100644 --- a/fence/agents/lib/fencing.py.py +++ b/fence/agents/lib/fencing.py.py @@ -750,14 +750,17 @@ def get_multi_power_fn(tn, options, get_power_fn): return status
def set_multi_power_fn(tn, options, set_power_fn): - for plug in options["--plugs"]: - try: - options["--uuid"] = str(uuid.UUID(plug)) - except ValueError: - pass - except KeyError: - pass - options["--plug"] = plug + if options.has_key("--plugs"): + for plug in options["--plugs"]: + try: + options["--uuid"] = str(uuid.UUID(plug)) + except ValueError: + pass + except KeyError: + pass + options["--plug"] = plug + set_power_fn(tn, options) + else: set_power_fn(tn, options)
cluster-commits@lists.fedorahosted.org