Masato Taruishi
taru****@users*****
2004年 10月 6日 (水) 02:11:14 JST
=================================================================== RCS file: ultrapossum/module/test/test.d/00protocol,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ultrapossum/module/test/test.d/00protocol 2004/10/05 13:50:43 1.1 +++ ultrapossum/module/test/test.d/00protocol 2004/10/05 17:11:14 1.2 @@ -24,11 +24,6 @@ set -e -if test "x$MASTER" != "x$HOST"; then - echo "Ignoring $0 for master server: $HOST" - exit $IGNORE -fi - if test "x$DEBUG" != "x"; then set -x fi =================================================================== RCS file: ultrapossum/module/test/test.d/05replication,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ultrapossum/module/test/test.d/05replication 2004/10/05 13:50:43 1.1 +++ ultrapossum/module/test/test.d/05replication 2004/10/05 17:11:14 1.2 @@ -21,7 +21,7 @@ set -e -if test "x$MASTER" != "x$HOST" || test "x$BACKUP$SLAVES" = "x"; then +if test "x$SLAVES" = "x"; then echo "Ignoring $0" exit $IGNORE fi @@ -48,13 +48,18 @@ ldapsearch -x -w $ROOTPW -LLL -D $ROOTDN -h $HOST -b $TESTSUFFIX ou=add > $tmp2 diff -c $tmp $tmp2 -sleep 5 - -for host in $BACKUP $SLAVES +sleep 1 +for host in $SLAVES do - echo "Checking for $host..." - ldapsearch -x -w $ROOTPW -LLL -D $ROOTDN -h $host -b $TESTSUFFIX ou=add > $tmp2 - diff -c $tmp $tmp2 + ( for i in 1 2 3 4 5 6 7 8 9 10 + do + echo "Checking for $host..." + ldapsearch -x -w $ROOTPW -LLL -D $ROOTDN -h $host -b $TESTSUFFIX ou=add > $tmp2 + diff -c $tmp $tmp2 && exit 0 + sleep $i + done + exit 1 + ) || exit 1 done ############ Modify Test @@ -81,13 +86,18 @@ ldapmodify -x -w $ROOTPW -D $ROOTDN -h $HOST -f $TMPFILE ldapsearch -x -L -b $TESTSUFFIX -h $HOST -D "cn=people,$TESTSUFFIX" -w new cn=people userPassword > $tmp -sleep 5 - -for host in $BACKUP $SLAVES +sleep 1 +for host in $SLAVES do - echo "Checking for $host..." - ldapsearch -x -L -b $TESTSUFFIX -h $host -D "cn=people,$TESTSUFFIX" -w new cn=people userPassword > $tmp2 - diff -c $tmp $tmp2 + ( for i in 1 2 3 4 5 6 7 8 9 10 + do + echo "Checking for $host..." + ldapsearch -x -L -b $TESTSUFFIX -h $host -D "cn=people,$TESTSUFFIX" -w new cn=people userPassword > $tmp2 + diff -c $tmp $tmp2 && exit 0 + sleep $i + done + exit 1 + ) || exit 1 done =================================================================== RCS file: ultrapossum/module/test/test.d/10clsfailover,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ultrapossum/module/test/test.d/10clsfailover 2004/10/05 13:50:43 1.1 +++ ultrapossum/module/test/test.d/10clsfailover 2004/10/05 17:11:14 1.2 @@ -20,7 +20,7 @@ set -e -if test "x$MASTER" != "x$HOST" || test "x$BACKUP" = "x"; then +if test "x$BACKUP" = "x"; then echo "Ignoring $0 for failover" exit $IGNORE fi @@ -37,18 +37,20 @@ EOF date -/etc/init.d/heartbeat stop +$MODULEDIR/server/startup stop ( - for i in 0 1 2 3 4 5 6 7 8 9 + for i in 1 2 3 4 5 6 7 8 9 do if ldapadd -x -h $BACKUP -D $ROOTDN -w $ROOTPW -f $TMPFILE; then exit 0 fi - sleep 1 + sleep $i done exit 1 ) || exit 1 date + +$MODULEDIR/server/startup start exit $OK