cluster/fence/agents/scsi scsi_reserve
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: rohara at 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.
fence/agents/scsi/scsi_reserve +11 -2
@@ -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)