mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
cleanup SLEEPs
This commit is contained in:
parent
3edbd4fee7
commit
9cd9638d89
@ -172,8 +172,9 @@ if test $RC != 0 ; then
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
echo "Waiting 15 seconds for syncrepl to receive changes..."
|
||||
sleep 15
|
||||
SLEEP=15
|
||||
echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
|
||||
sleep $SLEEP
|
||||
|
||||
# first check
|
||||
#echo "Using ldapsearch to read all the entries from the master..."
|
||||
@ -212,10 +213,12 @@ if test $? != 0 ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Stopping the provider, sleeping 10 seconds and restarting it..."
|
||||
SLEEP=10
|
||||
echo "Stopping the provider, sleeping $SLEEP seconds and restarting it..."
|
||||
kill -HUP "$MASTERPID"
|
||||
sleep 10
|
||||
echo "RESTART" >> $LOG1
|
||||
sleep $SLEEP
|
||||
|
||||
echo "======================= RESTART =======================" >> $LOG1
|
||||
$SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING >> $LOG1 2>&1 &
|
||||
MASTERPID=$!
|
||||
if test $WAIT != 0 ; then
|
||||
@ -331,8 +334,9 @@ if test $RC != 0 ; then
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
echo "Waiting 15 seconds for syncrepl to receive changes..."
|
||||
sleep 15
|
||||
SLEEP=15
|
||||
echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
|
||||
sleep $SLEEP
|
||||
|
||||
# second check
|
||||
#echo "Using ldapsearch to read all the entries from the master..."
|
||||
@ -371,9 +375,10 @@ if test $? != 0 ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Stopping proxy to test recovery..."
|
||||
SLEEP=10
|
||||
echo "Stopping proxy to test recovery; sleep for $SLEEP seconds..."
|
||||
kill -HUP $PROXYPID
|
||||
sleep 10
|
||||
sleep $SLEEP
|
||||
|
||||
echo "Modifying more entries on the master..."
|
||||
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD >> \
|
||||
@ -400,7 +405,7 @@ cn: Tiberius J. Hooker
|
||||
EOMODS
|
||||
|
||||
echo "Restarting proxy..."
|
||||
echo "RESTART" >> $LOG3
|
||||
echo "======================= RESTART =======================" >> $LOG3
|
||||
$SLAPD -f $CONF3 -h $URI3 -d $LVL $TIMING >> $LOG3 2>&1 &
|
||||
PROXYPID=$!
|
||||
if test $WAIT != 0 ; then
|
||||
@ -409,8 +414,9 @@ if test $WAIT != 0 ; then
|
||||
fi
|
||||
KILLPIDS="$MASTERPID $SLAVEPID $PROXYPID"
|
||||
|
||||
echo "Waiting 25 seconds for syncrepl to receive changes..."
|
||||
sleep 25
|
||||
SLEEP=25
|
||||
echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
|
||||
sleep $SLEEP
|
||||
|
||||
# third check
|
||||
#echo "Using ldapsearch to read all the entries from the master..."
|
||||
@ -468,8 +474,9 @@ EOMODS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
echo "Waiting 15 seconds for syncrepl to receive changes..."
|
||||
sleep 15
|
||||
SLEEP=15
|
||||
echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
|
||||
sleep $SLEEP
|
||||
fi
|
||||
|
||||
# fourth check
|
||||
@ -509,9 +516,10 @@ if test $? != 0 ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Stopping consumer to test recovery..."
|
||||
SLEEP=10
|
||||
echo "Stopping consumer to test recovery; wait $SLEEP seconds..."
|
||||
kill -HUP $SLAVEPID
|
||||
sleep 10
|
||||
sleep $SLEEP
|
||||
|
||||
echo "Modifying more entries on the master..."
|
||||
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD >> \
|
||||
@ -524,7 +532,7 @@ drink: Mad Dog 20/20
|
||||
EOMODS
|
||||
|
||||
echo "Restarting consumer..."
|
||||
echo "RESTART" >> $LOG2
|
||||
echo "======================= RESTART =======================" >> $LOG2
|
||||
$SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING >> $LOG2 2>&1 &
|
||||
SLAVEPID=$!
|
||||
if test $WAIT != 0 ; then
|
||||
@ -533,8 +541,9 @@ if test $WAIT != 0 ; then
|
||||
fi
|
||||
KILLPIDS="$MASTERPID $SLAVEPID $PROXYPID"
|
||||
|
||||
echo "Waiting 25 seconds for syncrepl to receive changes..."
|
||||
sleep 25
|
||||
SLEEP=25
|
||||
echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
|
||||
sleep $SLEEP
|
||||
|
||||
# fifth check
|
||||
#echo "Using ldapsearch to read all the entries from the master..."
|
||||
@ -600,8 +609,9 @@ if test $RC != 0 ; then
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
echo "Waiting 15 seconds for syncrepl to receive changes..."
|
||||
sleep 15
|
||||
SLEEP=15
|
||||
echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
|
||||
sleep $SLEEP
|
||||
|
||||
# sixth check
|
||||
#echo "Using ldapsearch to read all the entries from the master..."
|
||||
|
Loading…
Reference in New Issue
Block a user