cluster: RHEL59 - fence_scsi_test: increment error count when reservation fails

rohara rohara at fedoraproject.org
Mon Apr 9 19:38:01 UTC 2012


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=9d063bab03bb6df39d6b4664b78d8f001fe9e92c
Commit:        9d063bab03bb6df39d6b4664b78d8f001fe9e92c
Parent:        e48ce7f40c8e285d5cddc654ed39e1e4381d44ed
Author:        Ryan O'Hara <rohara at redhat.com>
AuthorDate:    Tue Apr 3 09:13:07 2012 -0500
Committer:     Ryan O'Hara <rohara at redhat.com>
CommitterDate: Mon Apr 9 14:35:50 2012 -0500

fence_scsi_test: increment error count when reservation fails

If the do_action_on subroutine fails to create a reservation, the
error count should be incremented not set to zero.

Resolves: rhbz#809481

Signed-off-by: Ryan O'Hara <rohara at redhat.com>
Reviewed-by: Lon Hohberger <lhh at redhat.com>
---
 fence/agents/scsi/fence_scsi_test.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fence/agents/scsi/fence_scsi_test.pl b/fence/agents/scsi/fence_scsi_test.pl
index 5c2302c..c012a12 100755
--- a/fence/agents/scsi/fence_scsi_test.pl
+++ b/fence/agents/scsi/fence_scsi_test.pl
@@ -44,7 +44,7 @@ sub do_action_on (\@$$)
 
     if (scalar (get_keys_reserve ($dev)) == 0) {
 	if (do_reserve ($dev, $node_key) != 0) {
-	    $err = 0;
+	    $err++;
 	}
     }
 


More information about the cluster-commits mailing list