Whamcloud - gitweb
EX-6692 tests: run LFSCK in sanity-lipe-scan3/find3
authorJian Yu <yujian@whamcloud.com>
Mon, 23 Jan 2023 19:43:02 +0000 (11:43 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 25 Jan 2023 03:18:08 +0000 (03:18 +0000)
Some tests running "lfs rm_entry" will leave the FID in
.lustre/fid/ undeleted, which causes sanity-lipe-scan3
and sanity-lipe-find3 fail. Since it is not possible to
list the .lustre/fid/ directory, we have to run LFSCK to
link the FID back into .lustre/lost+found so as to
check if the file system needs to be reformatted.

Test-Parameters: trivial testlist=sanityn,sanity-lipe-scan3
Test-Parameters: trivial testlist=sanityn,sanity-lipe-find3

Fixes: 933691b3d7 ("EX-6692 tests: clean up test env in sanity-lipe-scan3.sh")
Fixes: de1bb57641 ("EX-6170 tests: make sanity-lipe-scan3.sh support remote MDS")
Fixes: 8b572c4de0 ("EX-6169 lipe: sanity-lipe-find3 reformat to clean lost+found")
Change-Id: If23479fc222052e25a7f21bcb70003c5176247b6
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/49674
Reviewed-by: Alexandre Ioffe <aioffe@ddn.com>
Reviewed-by: Colin Faber <cfaber@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/sanity-lipe-find3.sh
lustre/tests/sanity-lipe-scan3.sh

index 7208dc7..44217e9 100644 (file)
@@ -31,13 +31,15 @@ done
 which jq || skip_env "jq is not installed"
 
 build_test_filter
+check_and_setup_lustre
+run_lfsck
+
 if [ -d $MOUNT/.lustre/lost+found ] && [ "$(ls -A $MOUNT/.lustre/lost+found)" ]
 then
        echo "Reformat file system"
        REFORMAT="yes" cleanup_and_setup_lustre
-else
-       check_and_setup_lustre
 fi
+
 # Try to support running from the build directory.
 if [[ "$mds_HOST" == "$HOSTNAME" ]]; then
        # Fixup GUILE_LOAD_PATH to support running from the build directory.
index 3c6826c..f01f12b 100644 (file)
@@ -42,12 +42,13 @@ FAIL_ON_ERROR=false
 declare -r ROOT_FID="[0x200000007:0x1:0x0]"
 
 build_test_filter
+check_and_setup_lustre
+run_lfsck
+
 if [ -d $MOUNT/.lustre/lost+found ] && [ "$(ls -A $MOUNT/.lustre/lost+found)" ]
 then
        echo "Reformat file system"
        REFORMAT="yes" cleanup_and_setup_lustre
-else
-       check_and_setup_lustre
 fi
 
 # choose a random MDS and return its facet