* [Cluster-devel] [PATCH] fence_rhevm: Incorrect status detected when VM is not in up/down
@ 2012-01-30 15:58 Marek 'marx' Grac
2012-01-30 20:35 ` Lon Hohberger
0 siblings, 1 reply; 2+ messages in thread
From: Marek 'marx' Grac @ 2012-01-30 15:58 UTC (permalink / raw)
To: cluster-devel.redhat.com
For fencing purposes we have to focus on getting OFF status
when machine is really 100% down, conditions for ON status are much simplier
(as fact that machine is has power does not mean that it works). This patch
specify condition for OFF status - in fact only 'Down' is accepted now
Resolves: rhbz#769681
---
fence/agents/rhevm/fence_rhevm.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fence/agents/rhevm/fence_rhevm.py b/fence/agents/rhevm/fence_rhevm.py
index 65a7395..3578b5f 100644
--- a/fence/agents/rhevm/fence_rhevm.py
+++ b/fence/agents/rhevm/fence_rhevm.py
@@ -41,10 +41,10 @@ def get_power_status(conn, options):
else:
status = result.group(1)
- if (status == "up"):
- return "on"
- else:
+ if (status.lower() == "down"):
return "off"
+ else:
+ return "on"
def set_power_status(conn, options):
action = {
--
1.7.4.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* [Cluster-devel] [PATCH] fence_rhevm: Incorrect status detected when VM is not in up/down
2012-01-30 15:58 [Cluster-devel] [PATCH] fence_rhevm: Incorrect status detected when VM is not in up/down Marek 'marx' Grac
@ 2012-01-30 20:35 ` Lon Hohberger
0 siblings, 0 replies; 2+ messages in thread
From: Lon Hohberger @ 2012-01-30 20:35 UTC (permalink / raw)
To: cluster-devel.redhat.com
On 01/30/2012 10:58 AM, Marek 'marx' Grac wrote:
> For fencing purposes we have to focus on getting OFF status
> when machine is really 100% down, conditions for ON status are much simplier
> (as fact that machine is has power does not mean that it works). This patch
> specify condition for OFF status - in fact only 'Down' is accepted now
>
> Resolves: rhbz#769681
> ---
> fence/agents/rhevm/fence_rhevm.py | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fence/agents/rhevm/fence_rhevm.py b/fence/agents/rhevm/fence_rhevm.py
> index 65a7395..3578b5f 100644
> --- a/fence/agents/rhevm/fence_rhevm.py
> +++ b/fence/agents/rhevm/fence_rhevm.py
> @@ -41,10 +41,10 @@ def get_power_status(conn, options):
> else:
> status = result.group(1)
>
> - if (status == "up"):
> - return "on"
> - else:
> + if (status.lower() == "down"):
> return "off"
> + else:
> + return "on"
>
> def set_power_status(conn, options):
> action = {
This looks correct based on the bugzilla.
-- Lon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-30 20:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-30 15:58 [Cluster-devel] [PATCH] fence_rhevm: Incorrect status detected when VM is not in up/down Marek 'marx' Grac
2012-01-30 20:35 ` Lon Hohberger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.