[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/fence/agents/scsi scsi_reserve



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	rohara sourceware org	2006-12-12 21:32:55

Modified files:
	fence/agents/scsi: scsi_reserve 

Log message:
	Fix success/failure reporting when registering devices at startup.
	If our node (key) is already registered with a given device, do not
	report failure since this is misleading.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/scsi/scsi_reserve.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.4&r2=1.1.2.5

--- cluster/fence/agents/scsi/scsi_reserve	2006/12/08 22:22:34	1.1.2.4
+++ cluster/fence/agents/scsi/scsi_reserve	2006/12/12 21:32:53	1.1.2.5
@@ -38,6 +38,8 @@
 #
 key=$( gethostip -x $node_name )
 
+###############################################################################
+
 case $1 in
 
 start)
@@ -62,8 +64,14 @@
   if [ $error -eq 0 ]; then
       success
   else
-      failure
-      rval=1
+      # perhaps we are already resgistered
+      #
+      if sg_persist -d $dev -i -k 2>/dev/null | grep -qiE "${key#0}" ; then
+          success
+      else
+          failure
+          rval=1
+      fi
   fi
 
   echo
@@ -108,6 +116,7 @@
 done
 
 rm -f /var/lock/subsys/scsi_reserve
+
 ;;
 
 status)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]