From fdb9d370541b6b5f5c90c8521b1fe3503655658f Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Sat, 13 Apr 2024 23:54:24 -0600 Subject: [PATCH] LU-16623 tests: ignore sanity-pfl stripe-count off-by-1 In some cases the MDS may not create all stripes on a file, if the MDT-OST connection does not have precreated objects. This is OK, so the tests should not fail the stripe-count check if trying to create a fully-striped file and one of the stripes is missing. Lustre-change: https://review.whamcloud.com/54778 Lustre-commit: e715a8c2a616f6d4158decfed5dec2fa444f0c67 Test-Parameters: trivial testlist=sanity-flr Signed-off-by: Andreas Dilger Change-Id: Ie482fdf86f82e7a2292c021761885249a6c551f1 Reviewed-by: Alex Zhuravlev Reviewed-by: Jian Yu Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55083 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/tests/sanity-flr.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/lustre/tests/sanity-flr.sh b/lustre/tests/sanity-flr.sh index d4e2e99..8e8cdaf 100644 --- a/lustre/tests/sanity-flr.sh +++ b/lustre/tests/sanity-flr.sh @@ -173,7 +173,9 @@ verify_comp_attr() { return } - [[ $value = $expected ]] || { + [[ $value = $expected ]] || + # file sometimes one stripe short if MDS-OST didn't precreate, LU-16623 + [[ $attr == "stripe-count" && $value == $((OSTCOUNT - 1)) ]] || { $getstripe_cmd $tf error "verify $attr failed on $tf: $value != $expected" } @@ -221,7 +223,9 @@ verify_comp_attr_with_parent() { value=$($tf_cmd $opt $tf) [[ $value = -1 ]] && value=$OSTCOUNT - [[ $value = $expected ]] || { + [[ $value = $expected ]] || + # file sometimes one stripe short if MDS-OST didn't precreate, LU-16623 + [[ $attr == "stripe-count" && $value == $((OSTCOUNT - 1)) ]] || { $td_cmd -d $td $tf_cmd -v $tf error "verify $attr failed with parent on $tf:" \ @@ -260,7 +264,9 @@ verify_comp_attr_with_default() { value=$($tf_cmd $opt $tf) [[ $value = -1 ]] && value=$OSTCOUNT - [[ $value = $expected ]] || { + [[ $value = $expected ]] || + # file sometimes one stripe short if MDS-OST didn't precreate, LU-16623 + [[ $attr == "stripe-count" && $value == $((OSTCOUNT - 1)) ]] || { $tf_cmd -v $tf error "verify $attr failed with default value on $tf:" \ "$value != $expected" @@ -3720,11 +3726,11 @@ function test_206() { run_test 206 "lfs setstripe -pool .. --comp-flags=.. " test_207() { - local file=$DIR/$tfile - local tmpfile=$DIR/$tfile-tt + local file=$DIR/$tfile + local tmpfile=$DIR/$tfile-tt - [ $MDS1_VERSION -lt $(version_code 2.14.50) ] && - skip "Need MDS version at least 2.14.50" + (( $MDS1_VERSION >= $(version_code v2_14_50-161-g571f3cf111) )) || + skip "Need MDS >= 2.14.50.161 for stale components fix" stack_trap "rm -f $tmpfile $file" -- 1.8.3.1