run_test 20a "|X| open(O_CREAT), unlink, replay, close (test mds_cleanup_orphans)"
test_20b() { # bug 10480
+ # XXX increase the debug level temporary
+ do_nodes $(comma_list $(nodes_list)) "$LCTL set_param debug=0x33f0406; $LCTL set_param debug_mb=150"
BEFOREUSED=`df -P $DIR | tail -1 | awk '{ print $3 }'`
dd if=/dev/zero of=$DIR/$tfile bs=4k count=10000 &
log "before $BEFOREUSED, after $AFTERUSED"
[ $AFTERUSED -gt $((BEFOREUSED + 20)) ] && \
error "after $AFTERUSED > before $BEFOREUSED"
+ # XXX decrease it back
+ do_nodes $(comma_list $(nodes_list)) "$LCTL set_param debug=$PTLDEBUG; $LCTL set_param debug_mb=$DEBUG_SIZE"
return 0
}
run_test 20b "write, unlink, eviction, replay, (test mds_cleanup_orphans)"
zconf_mount_clients $clients $DIR
- local duration=120
+ local duration=300
[ "$SLOW" = "no" ] && duration=60
local cmd="rundbench 1 -t $duration"
local PID=""
LCTL=$LCTL $cmd" &
PID=$!
log "Started rundbench load PID=$PID ..."
-
- sleep $((duration / 4))
- replay_barrier $SINGLEMDS
- sleep 3 # give clients a time to do operations
-
- log "$TESTNAME fail mds 1"
- fail $SINGLEMDS
-
+ ELAPSED=0
+ NUM_FAILOVERS=0
+ START_TS=$(date +%s)
+ CURRENT_TS=$START_TS
+ while [ $ELAPSED -lt $duration ]; do
+ sleep 1
+ replay_barrier $SINGLEMDS
+ sleep 1 # give clients a time to do operations
+ # Increment the number of failovers
+ NUM_FAILOVERS=$((NUM_FAILOVERS+1))
+ log "$TESTNAME fail mds1 $NUM_FAILOVERS times"
+ facet_failover $SINGLEMDS
+ CURRENT_TS=$(date +%s)
+ ELAPSED=$((CURRENT_TS - START_TS))
+ done
wait $PID || error "rundbench load on $CLIENTS failed!"
}
run_test 70b "mds recovery; $CLIENTCOUNT clients"