public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* master - fence: Fix operation 'list' and 'monitor' for LDOM and ePowerSwitch
@ 2008-11-04 10:36 Jan Friesse
  0 siblings, 0 replies; only message in thread
From: Jan Friesse @ 2008-11-04 10:36 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=90c6340891ae9bffd09f3a2e31a1d10b3dda8200
Commit:        90c6340891ae9bffd09f3a2e31a1d10b3dda8200
Parent:        d42d261ebb813af778acab632a880e304cb00312
Author:        Jan Friesse <jfriesse@redhat.com>
AuthorDate:    Tue Nov 4 11:32:11 2008 +0100
Committer:     Jan Friesse <jfriesse@redhat.com>
CommitterDate: Tue Nov 4 11:34:35 2008 +0100

fence: Fix operation 'list' and 'monitor' for LDOM and ePowerSwitch

This two fence agents had same method for getting power status
and getting outlets. In method was simple checking, which
operation should be processed, but main fencing library doesn't
set this option to 'status' in case of powering outlet on or off.

This led to bad behaviour in case of on, off and reboot operation.
Operations status, list and monitor wasn't affected.
---
 fence/agents/eps/fence_eps.py   |    2 +-
 fence/agents/ldom/fence_ldom.py |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fence/agents/eps/fence_eps.py b/fence/agents/eps/fence_eps.py
index c56ffb8..921487b 100644
--- a/fence/agents/eps/fence_eps.py
+++ b/fence/agents/eps/fence_eps.py
@@ -73,7 +73,7 @@ def get_power_status(conn, options):
 	for out_num,out_stat in status:
 		result[out_num]=("",(out_stat=="1" and "on" or "off"))
 
-	if (options["-o"] == "status"):
+	if (not (options["-o"] in ['monitor','list'])):
 		if (not (options["-n"] in result)):
 			fail_usage("Failed: You have to enter existing physical plug!")
 		else:
diff --git a/fence/agents/ldom/fence_ldom.py b/fence/agents/ldom/fence_ldom.py
index 78771c6..390d072 100644
--- a/fence/agents/ldom/fence_ldom.py
+++ b/fence/agents/ldom/fence_ldom.py
@@ -57,7 +57,7 @@ def get_power_status(conn, options):
 	except pexpect.TIMEOUT:
 		fail(EC_TIMED_OUT)
 
-	if (options["-o"] == "status"):
+	if (not (options["-o"] in ['monitor','list'])):
 		if (not (options["-n"] in result)):
 			fail_usage("Failed: You have to enter existing logical domain!")
 		else:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-04 10:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-04 10:36 master - fence: Fix operation 'list' and 'monitor' for LDOM and ePowerSwitch Jan Friesse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).