From: Fan Yong Date: Wed, 2 Jun 2010 01:44:57 +0000 (+0800) Subject: b=18741 replace checking the return value of "lfs setquota" with checking the output... X-Git-Tag: v1_10_0_44~42 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=8e166d9f0d7fd4405c9f0ba7c566fc0c021309ce;p=fs%2Flustre-release.git b=18741 replace checking the return value of "lfs setquota" with checking the output message of it for detailed error replace checking the return value of "lfs setquota" with checking the output message of it for detailed error i=andrew.perepechko i=robert.read --- diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh index 0c30d30..876d2f3 100644 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -189,15 +189,15 @@ resetquota() { fi while [ $((count++)) -lt $timeout ]; do - $LFS setquota "$1" "$2" -b 0 -B 0 -i 0 -I 0 $MOUNT - RC=$? + local RC=0 + OUTPUT=`$LFS setquota "$1" "$2" -b 0 -B 0 -i 0 -I 0 $MOUNT 2>&1` || RC=${PIPESTATUS[0]} if [ $RC -ne 0 ]; then - if [ $RC -eq 240 ]; then # 240 means -EBUSY - log "resetquota is blocked for quota master recovery, retry after 1 sec" - sleep 1 + if echo "$OUTPUT" | grep -q busy; then + log "resetquota is blocked for quota master recovery, retry after $((count * 3)) sec" + sleep 3 continue else - error "resetquota failed: $RC" + error "resetquota failed" fi fi break