Whamcloud - gitweb
LU-16623 tests: ignore sanity-pfl stripe-count off-by-1 83/55083/2
authorAndreas Dilger <adilger@whamcloud.com>
Sun, 14 Apr 2024 05:54:24 +0000 (23:54 -0600)
committerOleg Drokin <green@whamcloud.com>
Wed, 29 May 2024 05:00:56 +0000 (05:00 +0000)
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 <adilger@whamcloud.com>
Change-Id: Ie482fdf86f82e7a2292c021761885249a6c551f1
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55083
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-flr.sh

index d4e2e99..8e8cdaf 100644 (file)
@@ -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"