Gitweb:
http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=a503b8...
Commit: a503b8a48236b63ba156d773aa60a41561c8f082
Parent: 06f7d26340d8f700dc834e8ce5495bf156e20d2e
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Wed Apr 17 10:24:20 2013 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Apr 17 10:24:20 2013 +0200
fencing: Monitor/list is not working correctly
Bug was introduced with multiple plug support.
---
fence/agents/lib/fencing.py.py | 3 ++-
tests/test-apc5.py | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 1109be6..b14c329 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -785,7 +785,8 @@ def fence_action(tn, options, set_power_fn, get_power_fn,
get_outlet_list = None
result = 0
try:
- options["--plugs"] = options["--plug"].split(",")
+ if options.has_key("--plug"):
+ options["--plugs"] = options["--plug"].split(",")
## Process options that manipulate fencing device
#####
diff --git a/tests/test-apc5.py b/tests/test-apc5.py
index 7e86a91..6cea3b1 100755
--- a/tests/test-apc5.py
+++ b/tests/test-apc5.py
@@ -9,8 +9,8 @@ def main():
ACT_ONOFF = "actions.d/power-on-off.cfg"
ACT_LIST = "actions.d/list.cfg"
- test_action(DEVICE, ACT_STATUS, "getopt")
- test_action(DEVICE, ACT_ONOFF, "stdin")
+ test_action(DEVICE, ACT_STATUS, "getopt", verbose=1)
+# test_action(DEVICE, ACT_ONOFF, "stdin")
test_action(DEVICE, ACT_LIST, "getopt")
if __name__ == "__main__":