From e5080203e1358673ad7518c2b86bc9a5fc654b5f Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 31 Jan 2020 14:09:14 -0700 Subject: [PATCH] LU-13184 tests: wait for OST startup in test_112 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 Change-Id: If2d547a42c51a7028803ec25680931a7593ebbe5 Reviewed-on: https://review.whamcloud.com/37393 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Nunez Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- lustre/tests/conf-sanity.sh | 4 ++++ lustre/tests/test-framework.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index a4bc3b8..3bf8598 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -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 } diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index fa873e0..d5c1968 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -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]} -- 1.8.3.1