Whamcloud - gitweb
LU-16623 tests: ignore sanity-pfl stripe-count off-by-1 78/54778/6
authorAndreas Dilger <adilger@whamcloud.com>
Sun, 14 Apr 2024 05:54:24 +0000 (23:54 -0600)
committerOleg Drokin <green@whamcloud.com>
Tue, 23 Apr 2024 19:46:44 +0000 (19:46 +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.

Test-Parameters: trivial testlist=sanity-flr
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie482fdf86f82e7a2292c021761885249a6c551f1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54778
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-flr.sh

index 03558df..371cc2b 100644 (file)
@@ -29,11 +29,11 @@ if [[ "$ost1_FSTYPE" == "zfs" ]]; then
 fi
 
 if [ -r /etc/redhat-release ]; then
-       rhel_version=$(cat /etc/redhat-release |
-               sed -e 's/^[^0-9.]*//g' | sed -e 's/[ ].*//')
-       if (( $(version_code $rhel_version) >= $(version_code 9.3.0) )); then
-               always_except LU-17675 61a
-       fi
+        rhel_version=$(cat /etc/redhat-release |
+                sed -e 's/^[^0-9.]*//g' | sed -e 's/[ ].*//')
+        if (( $(version_code $rhel_version) >= $(version_code 9.3.0) )); then
+                always_except LU-17675 61a
+        fi
 fi
 
 build_test_filter
@@ -181,7 +181,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"
        }
@@ -229,7 +231,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:" \
@@ -268,7 +272,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"
@@ -4195,11 +4201,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"