From 028ed64d90cfdeb908fb5574aacf2f71c259e2c2 Mon Sep 17 00:00:00 2001 From: Alexander Zarochentsev Date: Thu, 4 Jan 2024 19:07:18 +0000 Subject: [PATCH] LU-17385 tests: sanity-lfsck 23d fix and enable lfsck "-t layout -o" requests lfsck runs on all MTDs, the test needs to wait them all before the next test starts. Test-Parameters: trivial testlist=sanity-lfsck mdscount=2 mdtcount=4 Test-Parameters: trivial testlist=sanity-lfsck mdscount=2 mdtcount=4 Test-Parameters: trivial testlist=sanity-lfsck mdscount=2 mdtcount=4 Test-Parameters: trivial testlist=sanity-lfsck mdscount=2 mdtcount=4 Signed-off-by: Alexander Zarochentsev Change-Id: Ida0bf876b60a73258a5a9bf392f96383c88adcb9 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53591 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao Reviewed-by: Alex Deiter Reviewed-by: Oleg Drokin --- lustre/tests/sanity-lfsck.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lustre/tests/sanity-lfsck.sh b/lustre/tests/sanity-lfsck.sh index 3e49078..3f5f68b 100755 --- a/lustre/tests/sanity-lfsck.sh +++ b/lustre/tests/sanity-lfsck.sh @@ -15,7 +15,7 @@ init_logging # bug number for skipped test: ALWAYS_EXCEPT="$SANITY_LFSCK_EXCEPT " -always_except LU-17385 23d +# always_except # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! [ "$SLOW" = "no" ] && EXCEPT_SLOW="" @@ -4239,10 +4239,13 @@ test_23d() { do_facet mds1 $LCTL lfsck_start -M ${FSNAME}-MDT0000 -t layout -o || error "lfsck namespace failed to start" - wait_update_facet mds1 "$LCTL get_param -n \ - mdd.${FSNAME}-MDT0000.lfsck_layout | - awk '/^status/ { print \\\$2 }'" "completed" 32 || - error " unexpected lfsck status" + + # lfsck -t layout -o broadcasts all MDTs to perform lfsck layout, + # wait them all + local count=$(do_facet mds1 $LCTL lfsck_query -t layout -w | + awk '/layout_mdts_completed:/ { print $2 }') + (( count != MDSCOUNT )) && + error "Only $count/$MDSCOUNT lfsck completed" cmp $DIR/$tdir/mdt1dir/foo <(echo "b-a-r") || error "file body has changed" } -- 1.8.3.1