This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cluster: RHEL5 - fence_mcdata: Fix unexpected port state


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=24bf3c1779fc33259ceb6ca095e738e288cce29e
Commit:        24bf3c1779fc33259ceb6ca095e738e288cce29e
Parent:        992658141fa495d902715fdba44f74dcbca8c8c8
Author:        Jan Friesse <jfriesse@redhat.com>
AuthorDate:    Wed Mar 4 15:29:31 2009 +0100
Committer:     Jan Friesse <jfriesse@redhat.com>
CommitterDate: Wed Mar 4 16:11:35 2009 +0100

fence_mcdata: Fix unexpected port state

Current versions of fence_mcdata wait for "Blocked:
(true|false)", but newer models (like Sphereon 4500) return
"Blocked:  (Blocked|Unblocked)" on the port show command.

The attached patch adds the necessary bits to make the
script recognize that it has indeed done the request action.

This patch long lives in RHEL 4 branch, but never
arrived to RHEL5/master/STABLE2/STABLE3.

RHBZ#470983
---
 fence/agents/mcdata/fence_mcdata.pl |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fence/agents/mcdata/fence_mcdata.pl b/fence/agents/mcdata/fence_mcdata.pl
index 47a7fcc..6f3c9ef 100755
--- a/fence/agents/mcdata/fence_mcdata.pl
+++ b/fence/agents/mcdata/fence_mcdata.pl
@@ -270,7 +270,9 @@ foreach my $line (@lines)
    }
    next unless ( $field eq "Blocked" );
    if ( ($block && $b_state eq "true") ||
-        (!$block && $b_state eq "false") )
+        (!$block && $b_state eq "false") ||
+        ($block && $b_state eq "Blocked") ||
+        (!$block && $b_state eq "Unblocked") )
    {
       $fail = 0;
    }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]