fence-agents: master - fencing: Improve work with invalid power states

Marek GrĂ¡c marx at fedoraproject.org
Fri Jun 7 11:02:51 UTC 2013


Gitweb:        http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=ecc2155cb2f27376034d6524d97d8e207e395588
Commit:        ecc2155cb2f27376034d6524d97d8e207e395588
Parent:        23850c66d9caf7d61dc4217ffae66a79b516fdff
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Fri Jun 7 12:58:18 2013 +0200
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Fri Jun 7 13:02:29 2013 +0200

fencing: Improve work with invalid power states

Previously, status for N ports was OFF if all of these nodes where off
and it differs when of these ports were ON. This did not work properly
when fence agents responeded with 'unknown' values. This patches fixes
this issue and if at least one value is non-OFF then status is not-OFF too.
---
 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 8be5f31..12521de 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -742,7 +742,7 @@ def get_multi_power_fn(tn, options, get_power_fn):
 
 			options["--plug"] = plug
 			plug_status = get_power_fn(tn, options)
-			if plug_status == "on":
+			if plug_status != "off":
 				status = plug_status
 	else:
 		status = get_power_fn(tn, options)


More information about the cluster-commits mailing list