FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 01-30-2012, 02:58 PM
"Marek 'marx' Grac"
 
Default fence_rhevm: Incorrect status detected when VM is not in up/down

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
 
Old 01-30-2012, 07:35 PM
Lon Hohberger
 
Default fence_rhevm: Incorrect status detected when VM is not in up/down

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
 

Thread Tools




All times are GMT. The time now is 04:25 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org