* [Cluster-devel] cluster/fence/agents/scsi scsi_reserve scsi_re ...
@ 2007-01-26 20:03 rohara
0 siblings, 0 replies; only message in thread
From: rohara @ 2007-01-26 20:03 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: rohara at sourceware.org 2007-01-26 20:03:51
Modified files:
fence/agents/scsi: scsi_reserve
Added files:
fence/agents/scsi: scsi_reserve.sysconfig scsi_watchdog
scsi_watchdog.conf
Log message:
Added support for watchdog "fencing".
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/scsi/scsi_reserve.sysconfig.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/scsi/scsi_watchdog.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/scsi/scsi_watchdog.conf.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/scsi/scsi_reserve.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.6.9&r2=1.1.6.10
--- cluster/fence/agents/scsi/scsi_reserve 2007/01/26 17:56:14 1.1.6.9
+++ cluster/fence/agents/scsi/scsi_reserve 2007/01/26 20:03:51 1.1.6.10
@@ -5,6 +5,8 @@
. /etc/init.d/functions
+[ -f /etc/sysconfig/scsi_reserve ] && . /etc/sysconfig/scsi_reserve
+
# check for sg_persist command provided by sg3_utils package
#
if ! sg_persist -V &> /dev/null ; then
@@ -65,16 +67,16 @@
if [ $error -eq 0 ]; then
echo $dev >> /var/run/scsi_reserve
- success
+ success "register of device $dev"
else
# perhaps we are already resgistered
#
if sg_persist -d $dev -i -k 2>/dev/null | grep -qiE "${key#0}" ; then
echo $dev >> /var/run/scsi_reserve
- success
+ success "register device $dev"
else
failure
- rval=1
+ rval=1
fi
fi
@@ -85,12 +87,37 @@
sg_persist -d $dev -o -R -K $key -T 5 &>/dev/null
done
+
+# start the watchdog if configured and registration was successful
+#
+if [ "$rval" == 0 ] && [ "${WATCHDOG}" == yes ] ; then
+ echo -n "Starting watchdog: "
+ if watchdog -c /etc/cluster/scsi_watchdog.conf ; then
+ success "watchdog start"
+ else
+ failure "watchdog start"
+ fi
+ echo
+fi
;;
stop)
rval=0
+# stop the watchdog before we unregister
+#
+if [ "${WATCHDOG}" == yes ]; then
+ echo -n "Stopping watchdog: "
+
+ if killproc watchdog ; then
+ success "watchdog stop"
+ else
+ failure "watchdog stop"
+ fi
+ echo
+fi
+
# unregister each device for this node
#
for dev in $scsi_devices
@@ -122,7 +149,7 @@
fi
if [ $error -eq 0 ]; then
- success
+ success "unregister device $dev"
else
failure
rval=1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-01-26 20:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-26 20:03 [Cluster-devel] cluster/fence/agents/scsi scsi_reserve scsi_re rohara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).