From: grev Date: Wed, 5 Sep 2007 18:12:47 +0000 (+0000) Subject: b=13500 X-Git-Tag: v1_8_0_110~1268 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=861462ee5d508973c70589f1dc45edb88ceb6718;p=fs%2Flustre-release.git b=13500 i=Nathan Wait for MDT value to update. --- diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 34214c1..24a9c39 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -1012,14 +1012,24 @@ test_29() { # check MDT too local MPROC="$LPROC/osc/$FSNAME-OST0001-osc/active" - RESULT=`do_facet mds " [ -r $MPROC ] && cat $MPROC"` - [ ${PIPESTATUS[0]} = 0 ] || error "Can't read $MPROC" - if [ $RESULT -ne $DEAC ]; then - echo "MDT not deactivated: $RESULT" - return 4 - else - echo "MDT deactivated: also" - fi + local MAX=30 + local WAIT=0 + while [ 1 ]; do + sleep 5 + RESULT=`do_facet mds " [ -r $MPROC ] && cat $MPROC"` + [ ${PIPESTATUS[0]} = 0 ] || error "Can't read $MPROC" + if [ $RESULT -eq $DEAC ]; then + echo "MDT deactivated also after $WAIT sec (got $RESULT)" + break + fi + WAIT=$((WAIT + 5)) + if [ $WAIT -eq $MAX ]; then + echo "MDT not deactivated: wanted $DEAC got $RESULT" + return 4 + fi + echo "Waiting $(($MAX - $WAIT)) secs for MDT deactivated" + done + # test new client starts deactivated umount_client $MOUNT || return 200 mount_client $MOUNT @@ -1307,4 +1317,3 @@ run_test 35 "Reconnect to the last active server first" equals_msg `basename $0`: test complete [ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG || true -