Whamcloud - gitweb
LU-13184 tests: wait for OST startup in test_112 93/37393/8
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 31 Jan 2020 21:09:14 +0000 (14:09 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 1 Feb 2021 08:52:09 +0000 (08:52 +0000)
Wait for OST0000 to finish mounting and connecting to the MDS before
forcing to create any files there.  Otherwise, intermittent failures
are seen because the OST has no objects and returns -ERANGE:

    lfs setstripe: 'f112.conf-sanity.0': Numerical result out of range
    problem creating f112.conf-sanity.0 on OST0000

Test-Parameters: trivial testlist=conf-sanity envdefinitions=ONLY=112,ONLY_REPEAT=100
Fixes: 416e67222b76 ("LU-12036 ofd: add 'no_precreate' mount option")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: If2d547a42c51a7028803ec25680931a7593ebbe5
Reviewed-on: https://review.whamcloud.com/37393
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/conf-sanity.sh
lustre/tests/test-framework.sh

index a4bc3b8..3bf8598 100644 (file)
@@ -8449,6 +8449,8 @@ test_112() {
        (( $val == 1 )) || error "obdfilter.$FSNAME-OST0001*.no_precreate=$val"
 
        mount_client $MOUNT || error "mount client failed"
+       wait_osc_import_state mds1 ost1 FULL
+       wait_osc_import_state client ost1 FULL
        wait_osc_import_state client ost2 FULL
 
        $LFS setstripe -i 0 $DIR/$tfile.0 ||
@@ -8460,6 +8462,8 @@ test_112() {
        sleep_maxage
        $LFS setstripe -i 1 $DIR/$tfile.2 ||
                error "failed to create $tfile.2 on ost1 facet"
+       # files not cleaned with ONLY_REPEAT because of client unmount below
+       rm -f $DIR/$tfile.[012]
        stop_ost2 || error "stop ost2 facet failed"
        cleanup
 }
index fa873e0..d5c1968 100755 (executable)
@@ -6618,7 +6618,7 @@ run_one_logged() {
 
                # remove temp files between repetitions to avoid test failures
                [ -n "$append" -a -n "$DIR" -a -n "$tdir" -a -n "$tfile" ] &&
-                       rm -rf $DIR/$tdir* $DIR/$tfile*
+                       rm -rvf $DIR/$tdir* $DIR/$tfile*
                # loop around subshell so stack_trap EXIT triggers each time
                (run_one $testnum "$testmsg") 2>&1 | tee -i $append $test_log
                rc=${PIPESTATUS[0]}