[DRBD-cvs] r1588 - branches/drbd-0.7/scripts
svn at svn.drbd.org
svn at svn.drbd.org
Wed Oct 13 16:54:10 CEST 2004
Author: lars
Date: 2004-10-13 16:54:07 +0200 (Wed, 13 Oct 2004)
New Revision: 1588
Modified:
branches/drbd-0.7/scripts/drbddisk
Log:
improve drbddisk: 'start' failed if heartbeat deadtime is shorter than drbd ping time
Modified: branches/drbd-0.7/scripts/drbddisk
===================================================================
--- branches/drbd-0.7/scripts/drbddisk 2004-10-13 09:42:03 UTC (rev 1587)
+++ branches/drbd-0.7/scripts/drbddisk 2004-10-13 14:54:07 UTC (rev 1588)
@@ -23,10 +23,18 @@
case "$CMD" in
start)
- $DRBDADM primary $RES
+ # try several times, in case heartbeat deadtime
+ # was smaller than drbd ping time
+ try=6
+ while true; do
+ $DRBDADM primary $RES && break
+ let "--try" || exit 20
+ sleep 1
+ done
;;
stop)
- $DRBDADM secondary $RES
+ # exec, so the exit code of drbdadm propagates
+ exec $DRBDADM secondary $RES
;;
status)
if [ "$RES" = "all" ]; then
More information about the drbd-cvs
mailing list