Whamcloud - gitweb
LU-14938 tests: fail_abort() in t-f to take care of MDTs 71/44671/15
authorAlex Zhuravlev <bzzz@whamcloud.com>
Mon, 16 Aug 2021 17:22:00 +0000 (20:22 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 27 Oct 2021 00:37:17 +0000 (00:37 +0000)
fail_abort() in test-framework ensures that the clients
are back after evictions. the same should be done for
MDTs as otherwise any subsequent test may fail due to
another MDT observing eviction and interrupting current
request with -EIO.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I0a00ece52d28c6d28eef029a4f87a348efaa041c
Reviewed-on: https://review.whamcloud.com/44671
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/recovery-small.sh
lustre/tests/test-framework.sh

index 7f0ef15..4506cce 100755 (executable)
@@ -2269,6 +2269,7 @@ test_110k() {
                error "cleanup: start mds2 failed"
        zconf_mount $(hostname) $MOUNT || error "cleanup: mount failed"
        client_up || error "post-failover df failed"
+       all_mds_up
 }
 run_test 110k "FID_QUERY failed during recovery"
 
index 97a73dc..e337b9d 100755 (executable)
@@ -3556,6 +3556,19 @@ clients_up() {
        lfs_df_check
 }
 
+all_mds_up() {
+       (( MDSCOUNT == 1 )) && return
+
+       # wait so that statfs data on MDT expire
+       local delay=$(do_facet $SINGLEMDS lctl \
+               get_param -n osp.*MDT0000*MDT0001.maxage)
+       sleep $delay
+       local nodes=$(comma_list $(mdts_nodes))
+       # initiate statfs RPC, all to all MDTs
+       do_nodes $nodes $LCTL get_param -N osp.*MDT*MDT*.filesfree >&/dev/null
+       do_nodes $nodes $LCTL get_param -N osp.*MDT*MDT*.filesfree >&/dev/null
+}
+
 client_up() {
        # usually checked on particular client or locally
        sleep 1
@@ -3789,6 +3802,7 @@ fail_abort() {
        mount_facet $facet -o $abort_type
        clients_up || echo "first stat failed: $?"
        clients_up || error "post-failover stat: $?"
+       all_mds_up
 }
 
 host_nids_address() {