Skip to content
Snippets Groups Projects
Commit 19dd7283 authored by Elena Gryaznova's avatar Elena Gryaznova
Browse files

b=13499

i=Adilger

Wait recovery complete before AFTERUSED is checked.
parent 9395cf2d
No related branches found
No related tags found
No related merge requests found
...@@ -443,7 +443,7 @@ test_20b() { # bug 10480 ...@@ -443,7 +443,7 @@ test_20b() { # bug 10480
fail mds # start orphan recovery fail mds # start orphan recovery
df -P $DIR || df -P $DIR || true # reconnect df -P $DIR || df -P $DIR || true # reconnect
sleep 2 wait_mds_recovery_done || error "MDS recovery not done"
AFTERUSED=`df -P $DIR | tail -1 | awk '{ print $3 }'` AFTERUSED=`df -P $DIR | tail -1 | awk '{ print $3 }'`
log "before $BEFOREUSED, after $AFTERUSED" log "before $BEFOREUSED, after $AFTERUSED"
......
...@@ -371,6 +371,24 @@ wait_for() { ...@@ -371,6 +371,24 @@ wait_for() {
wait_for_host $HOST wait_for_host $HOST
} }
wait_mds_recovery_done () {
local timeout=`do_facet mds cat /proc/sys/lustre/timeout`
#define OBD_RECOVERY_TIMEOUT (obd_timeout * 5 / 2)
# as we are in process of changing obd_timeout in different ways
# let's set MAX longer than that
MAX=$(( timeout * 4 ))
WAIT=0
while [ $WAIT -lt $MAX ]; do
STATUS=`do_facet mds grep status /proc/fs/lustre/mds/*-MDT*/recovery_status`
echo $STATUS | grep COMPLETE && return 0
sleep 5
WAIT=$((WAIT + 5))
echo "Waiting $(($MAX - $WAIT)) secs for MDS recovery done"
done
echo "MDS recovery not done in $MAX sec"
return 1
}
client_df() { client_df() {
# not every config has many clients # not every config has many clients
if [ -n "$CLIENTS" ]; then if [ -n "$CLIENTS" ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment