From 755c9c0f78a777b342a42a74aa8fb93d04e7cad8 Mon Sep 17 00:00:00 2001 From: Sebastien Buisson Date: Mon, 1 Jul 2024 11:01:54 +0200 Subject: [PATCH] LU-17165 tests: fix recovery-small test_141 Wait for import generation change before counting the locks when the MGS has been restarted. And to make things clearer, check lock count on OST side. Test-Parameters: trivial Test-Parameters: mdscount=2 mdtcount=4 osscount=1 ostcount=8 clientcount=2 testlist=recovery-small env=ONLY=141,ONLY_REPEAT=20 Signed-off-by: Sebastien Buisson Change-Id: Ie9526aa38e3a669b7865516a296dfeed438a83f3 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55591 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Alex Deiter Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/tests/recovery-small.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index 376e443..dd971ca 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -3033,6 +3033,7 @@ run_test 140b "local mount is excluded from recovery" test_141() { local oldc local newc + local oldgen [ "$PARALLEL" == "yes" ] && skip "skip parallel run" combined_mgs_mds || skip "needs combined MGS/MDT" @@ -3040,12 +3041,17 @@ test_141() { skip "cannot run in local mode or from build tree" # some get_param have a bug to handle dot in param name - do_rpc_nodes $(facet_active_host $SINGLEMDS) cancel_lru_locks MGC - oldc=$(do_facet $SINGLEMDS $LCTL get_param -n \ + oldgen=$(do_facet ost1 $LCTL get_param -n mgc.*.import | + awk '/generation:/{print $NF}') + do_rpc_nodes $(facet_active_host ost1) cancel_lru_locks MGC + oldc=$(do_facet ost1 $LCTL get_param -n \ 'ldlm.namespaces.MGC*.lock_count') fail $SINGLEMDS - do_rpc_nodes $(facet_active_host $SINGLEMDS) cancel_lru_locks MGC - newc=$(do_facet $SINGLEMDS $LCTL get_param -n \ + wait_mgc_import_state ost1 FULL + wait_update_facet_cond ost1 "$LCTL get_param -n mgc.*.import | + awk '/generation:/{print}' | cut -d':' -f2" != " $oldgen" + do_rpc_nodes $(facet_active_host ost1) cancel_lru_locks MGC + newc=$(do_facet ost1 $LCTL get_param -n \ 'ldlm.namespaces.MGC*.lock_count') [ $oldc -eq $newc ] || error "mgc lost locks ($oldc != $newc)" -- 1.8.3.1