Skip to contentSkip to conversation

cluster/fence/agents/scsi scsi_reserve

Cluster-devel [email protected] 1 participant 1 message Nov 29, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: rohara at sourceware.org 2006-11-29 20:54:42

Modified files:
fence/agents/scsi: scsi_reserve

Log message:
Fix unregister code to report failure correctly.

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.2&r2=1.1.2.3

fence/agents/scsi/scsi_reserve +3 -2
@@ -83,12 +83,13 @@
 #
 for dev in $scsi_devices
 do
+  echo -n "Unregistering device: $dev"
 
+  # check if this node/key is the node/key holding the reservation
+  #
   if sg_persist -d $dev -i -r 2>/dev/null | grep -qiE "${key#0}" ; then
-      echo "Unable to unregister device: $dev"
       error=1
   else
-      echo -n "Unregistering device: $dev"
       for error in 1
 	do
 	sg_persist -d $dev -o -G -K $key -S 0 &>/dev/null || break