From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lon Hohberger Date: Mon, 30 Jan 2012 15:35:21 -0500 Subject: [Cluster-devel] [PATCH] fence_rhevm: Incorrect status detected when VM is not in up/down In-Reply-To: <1327939117-22731-1-git-send-email-mgrac@redhat.com> References: <1327939117-22731-1-git-send-email-mgrac@redhat.com> Message-ID: <4F26FF09.5070407@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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