Whamcloud - gitweb
LU-16842 fsx: tolerate delete last non-stale mirror error 90/51090/3
authorBobi Jam <bobijam@whamcloud.com>
Tue, 23 May 2023 03:11:37 +0000 (11:11 +0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 8 Jul 2023 22:35:33 +0000 (22:35 +0000)
fsx mirror split test could try to delete the last non-stale mirror
of a file and that's a tolerable error scenario. The fsx FLR test
randomly choose a mirror operation and this situation could happen.

Test-Parameters: trivial testlist=sanity-flr env=ONLY=70a
Fixes: 04ab0cc869c (LU-14156 utils: mirror split to check for last in-sync early)
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I80c294da80740b21e00ae72a092fd8883ec7d60e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51090
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/fsx.c
lustre/tests/sanity-flr.sh

index fde6abe..8c31179 100644 (file)
@@ -1442,7 +1442,12 @@ do_mirror_ops(int op)
                rc = WEXITSTATUS(rc);
                if (rc > 0) {
                        prt("%s: %d\n", cmd, rc);
-                       report_failure(184);
+                       /**
+                        * mirror split won't delete the last non-stale mirror,
+                        * and returns EUCLEAN
+                        */
+                       if (rc != EUCLEAN)
+                               report_failure(184);
                }
        }
        output_debug(monitorstart, 0, cmd);
index bf23908..439211f 100644 (file)
@@ -3255,7 +3255,7 @@ test_70() {
 }
 run_test 70 "mirror create and split race"
 
-test_100() {
+test_70a() {
        local tf=$DIR/$tdir/$tfile
 
        (( $OST1_VERSION >= $(version_code 2.14.51) )) ||
@@ -3271,7 +3271,7 @@ test_100() {
        FSXNUM=${FSXNUM:-1000}
        $FSX -p 5 -N $FSXNUM -S 0 -M $tf || error "fsx FLR file $tf failed"
 }
-run_test 100 "flr mode fsx test"
+run_test 70a "flr mode fsx test"
 
 write_file_200() {
        local tf=$1