Whamcloud - gitweb
LU-6609 test: wait for import state FULL
[fs/lustre-release.git] / lustre / tests / recovery-small.sh
index a7033e4..c311e81 100755 (executable)
@@ -1076,20 +1076,21 @@ test_26a() {      # was test_26 bug 5921 - evict dead exports by pinger
 
        check_timeout || return 1
 
-       local OST_NEXP=$(do_facet ost1 lctl get_param -n obdfilter.${ost1_svc}.num_exports | cut -d' ' -f2)
-
-       echo starting with $OST_NEXP OST exports
 # OBD_FAIL_PTLRPC_DROP_RPC 0x505
        do_facet client lctl set_param fail_loc=0x505
-        # evictor takes PING_EVICT_TIMEOUT + 3 * PING_INTERVAL to evict.
-        # But if there's a race to start the evictor from various obds,
-        # the loser might have to wait for the next ping.
-
+       local before=$(date +%s)
        local rc=0
-       wait_client_evicted ost1 $OST_NEXP $((TIMEOUT * 2 + TIMEOUT * 3 / 4))
-       rc=$?
+
+       # evictor takes PING_EVICT_TIMEOUT + 3 * PING_INTERVAL to evict.
+       # But if there's a race to start the evictor from various obds,
+       # the loser might have to wait for the next ping.
+       sleep $((TIMEOUT * 2 + TIMEOUT * 3 / 4))
        do_facet client lctl set_param fail_loc=0x0
-        [ $rc -eq 0 ] || error "client not evicted from OST"
+       do_facet client df > /dev/null
+
+       local oscs=$(lctl dl | awk '/-osc-/ {print $4}')
+       check_clients_evicted $before ${oscs[@]}
+       check_clients_full 10 ${oscs[@]}
 }
 run_test 26a "evict dead exports"
 
@@ -1820,7 +1821,7 @@ test_103()
         do_facet mgs $LCTL list_param mgs.*.ir_timeout ||
                 { skip "MGS without IR support"; return 0; }
 
-        combined_mgs_mds && skip "mgs and mds on the same target" && return 0
+       combined_mgs_mds && skip "needs separate mgs and mds" && return 0
 
         # workaround solution to generate config log on the mds
         remount_facet mds1
@@ -2534,6 +2535,10 @@ test_130_base() {
 
 test_130a() {
        remote_mds_nodsh && skip "remote MDS with nodsh" && return
+       local server_version=$(lustre_version_code $SINGLEMDS)
+       [[ $server_version -ge $(version_code 2.7.2) ]] ||
+               { skip "Need server version newer than 2.7.1"; return 0; }
+
        test_130_base
 
        wait $T130_PID || [ $? -eq 0 ] && error "stat should fail"
@@ -2543,6 +2548,10 @@ run_test 130a "enqueue resend on not existing file"
 
 test_130b() {
        remote_mds_nodsh && skip "remote MDS with nodsh" && return
+       local server_version=$(lustre_version_code $SINGLEMDS)
+       [[ $server_version -ge $(version_code 2.7.2) ]] ||
+               { skip "Need server version newer than 2.7.1"; return 0; }
+
        test_130_base
        # let the reply to be dropped
        sleep 10
@@ -2677,53 +2686,6 @@ test_133() {
 }
 run_test 133 "don't fail on flock resend"
 
-test_134() {
-       local file1
-       local pid1
-       local pid2
-       local i
-
-       [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return 0
-       [[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.8.59) ]] &&
-               skip "Need MDS version at least 2.8.59" && return
-
-       test_mkdir -p $DIR/$tdir
-       file1="$DIR/$tdir/file1"
-       file2="$DIR/$tdir/file2"
-
-#define OBD_FAIL_MDS_OSP_PRECREATE_WAIT         0x164
-       # reserve stripe on ost1, block on ost2
-       do_facet $SINGLEMDS \
-               "lctl set_param fail_loc=0x80000164 fail_val=1"
-       $SETSTRIPE  -c 2 -o 0,1 $file1 &
-       pid1=$!
-       sleep 1
-
-       # initiate recovery with orphan cleanup on ost1
-       facet_failover ost1
-
-       # when OST1 recovery is over, the first setstripe should still
-       # have the object reserved, but that should not block new creates
-       # on OST1
-       $SETSTRIPE  -c 1 -o 0 $file2 &
-       pid2=$!
-       for ((i=0;i<$((TIMEOUT/2));i++)); do
-               if ! stat /proc/$pid2 >&/dev/null; then
-                       echo "DONE!"
-                       break
-               fi
-               echo "WAITING ..."
-               sleep 1
-       done
-       if let "i >= (TIMEOUT/2)"; then
-               error "create seem to get blocked by recovery"
-       fi
-       wait $pid1
-       wait $pid2
-       return 0
-}
-run_test 134 "MDT<>OST recovery don't block multistripe file creation"
-
 complete $SECONDS
 check_and_cleanup_lustre
 exit_status