. $LUSTRE/tests/test-framework.sh
init_test_env $@
. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+init_logging
CHECK_GRANT=${CHECK_GRANT:-"yes"}
GRANT_CHECK_LIST=${GRANT_CHECK_LIST:-""}
-remote_mds_nodsh && log "SKIP: remote MDS with nodsh" && exit 0
+require_dsh_mds || exit 0
# Skip these tests
-# bug number: 17466 18857,15962 21240
-ALWAYS_EXCEPT="61d 33a 33b 44 $REPLAY_SINGLE_EXCEPT"
+# bug number: 17466 18857
+ALWAYS_EXCEPT="61d 33a 33b $REPLAY_SINGLE_EXCEPT"
if [ "$FAILURE_MODE" = "HARD" ] && mixed_ost_devs; then
CONFIG_EXCEPTIONS="0b 42 47 61a 61c"
}
run_test 43 "mds osc import failure during recovery; don't LBUG"
-test_44a() { # was test_44
+test_44a() { # was test_44
local at_max_saved=0
mdcdev=`lctl get_param -n devices | awk '/MDT0000-mdc-/ {print $1}'`
fi
for i in `seq 1 10`; do
- echo "$i of 10 ($(date +%s))"
- do_facet $SINGLEMDS "lctl get_param -n mdt.*.mdt.timeouts | grep service"
- #define OBD_FAIL_TGT_CONN_RACE 0x701
- do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000701"
- $LCTL --device $mdcdev recover || return 4
- df $MOUNT
+ echo "$i of 10 ($(date +%s))"
+ do_facet $SINGLEMDS "lctl get_param -n mdt.*.mdt.timeouts | grep service"
+ #define OBD_FAIL_TGT_CONN_RACE 0x701
+ do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000701"
+ # lctl below may fail, it is valid case
+ $LCTL --device $mdcdev recover
+ df $MOUNT
done
do_facet $SINGLEMDS "lctl set_param fail_loc=0"
[ $at_max_saved -ne 0 ] && at_max_set $at_max_saved mds
for i in `seq 1 10`; do
echo "$i of 10 ($(date +%s))"
- do_facet $SINGLEMDS "lctl get_param -n mdt.*.mdt.timeouts | grep service"
- #define OBD_FAIL_TGT_DELAY_RECONNECT 0x704
- do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000704"
- $LCTL --device $mdcdev recover || return 4
- df $MOUNT
+ do_facet $SINGLEMDS "lctl get_param -n mdt.*.mdt.timeouts | grep service"
+ #define OBD_FAIL_TGT_DELAY_RECONNECT 0x704
+ do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000704"
+ # lctl below may fail, it is valid case
+ $LCTL --device $mdcdev recover
+ df $MOUNT
done
do_facet $SINGLEMDS "lctl set_param fail_loc=0"
return 0
kill -USR1 $close_pid
cancel_lru_locks mdc # force the close
+ #bz20647: make sure all pids are exists before failover
+ [ -d /proc/$close_pid ] || error "close_pid doesn't exist"
+ [ -d /proc/$open_pid ] || error "open_pid doesn't exists"
replay_barrier_nodf $SINGLEMDS
fail_nodf $SINGLEMDS
wait $open_pid || return 1
run_test 53c "|X| open request and close request while two MDC requests in flight"
test_53d() {
+ cancel_lru_locks mdc # cleanup locks from former test cases
rm -rf $DIR/${tdir}-1 $DIR/${tdir}-2
mkdir -p $DIR/${tdir}-1
kill -USR1 $close_pid
cancel_lru_locks mdc # force the close
+ #bz20647: make sure all pids are exists before failover
+ [ -d /proc/$close_pid ] || error "close_pid doesn't exist"
+ [ -d /proc/$open_pid ] || error "open_pid doesn't exists"
replay_barrier_nodf $SINGLEMDS
fail_nodf $SINGLEMDS
wait $open_pid || return 1
do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000115"
kill -USR1 $close_pid
cancel_lru_locks mdc # force the close
-
do_facet $SINGLEMDS "lctl set_param fail_loc=0"
+
+ #bz20647: make sure all pids are exists before failover
+ [ -d /proc/$close_pid ] || error "close_pid doesn't exist"
+ [ -d /proc/$open_pid ] || error "open_pid doesn't exists"
replay_barrier_nodf $SINGLEMDS
fail_nodf $SINGLEMDS
wait $open_pid || return 1
cancel_lru_locks mdc # force the close
sleep 1
+ #bz20647: make sure all pids are exists before failover
+ [ -d /proc/$close_pid ] || error "close_pid doesn't exist"
+ [ -d /proc/$open_pid ] || error "open_pid doesn't exists"
replay_barrier_nodf $SINGLEMDS
fail_nodf $SINGLEMDS
wait $open_pid || return 1
[ "$SLOW" = "no" ] && duration=60
local cmd="rundbench 1 -t $duration"
local PID=""
- do_nodes --verbose $clients "set -x; MISSING_DBENCH_OK=$MISSING_DBENCH_OK \
+ do_nodesv $clients "set -x; MISSING_DBENCH_OK=$MISSING_DBENCH_OK \
PATH=:$PATH:$LUSTRE/utils:$LUSTRE/tests/:$DBENCH_LIB \
DBENCH_LIB=$DBENCH_LIB TESTSUITE=$TESTSUITE TESTNAME=$TESTNAME \
LCTL=$LCTL $cmd" &
run_test 83b "fail log_add during unlink recovery"
test_84a() {
-#define OBD_FAIL_MDS_OPEN_WAIT_CREATE 0x143
- do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000143"
+#define OBD_FAIL_MDS_OPEN_WAIT_CREATE 0x144
+ do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000144"
createmany -o $DIR/$tfile- 1 &
PID=$!
mds_evict_client