Whamcloud - gitweb
LU-18357 test: fix sanity-sec 27a interop with long fileset 36/58436/2
authorMarc Vef <mvef@whamcloud.com>
Mon, 17 Mar 2025 12:57:08 +0000 (13:57 +0100)
committerOleg Drokin <green@whamcloud.com>
Wed, 26 Mar 2025 04:06:08 +0000 (04:06 +0000)
The fileset length in sanity-sec 27a was signficantly increased to
test multiple fileset fragments on the IAM. This long fileset is also
used in interop with "lctl set_param -P" with older servers instead of
"lctl nodemap_set_fileset".

However, running "lctl get_param" with this long fileset on older
servers (<=2.15) causes a line break (due to the output being longer
than 80 characters) which results in "wait_nm_sync" to fail when
comparing the expected vs. the actual output.

This patch modifies sanity-sec test 27a and reverts the fileset to its
original much shorter path in the interop case when "lctl set_param
-P" must be used. When "lctl nodemap_set_fileset" is used, the long
fileset is still set to test multiple fileset fragments.

Test-Parameters: trivial testlist=sanity-sec
Test-Parameters: trivial testlist=sanity-sec serverversion=2.15
Fixes: da3536da22ab ("LU-18357 ptlrpc: Use nodemap IAM for persisting filesets")
Signed-off-by: Marc Vef <mvef@whamcloud.com>
Change-Id: Ie1d39f3f986675133fd9d4c294e7af186f2ed1b9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58436
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-sec.sh

index 78152db..75857d0 100755 (executable)
@@ -2154,14 +2154,18 @@ nodemap_exercise_fileset() {
        local check_proj=true
        local loop=0
        local nm="$1"
+       local subdir="subdir_${nm}"
+       local subsubdir="subsubdir_${nm}"
 
        (( $MDS1_VERSION >= $(version_code 2.14.52) )) || check_proj=false
 
        # when "have_persistent_fset_cmd" is true, "lctl nodemap_set_fileset"
        # is persistent, otherwise "lctl set_param -P" must be used
        have_persistent_fset_cmd=false
-       (( $MGS_VERSION >= $(version_code 2.16.51) )) &&
+       if (( $MGS_VERSION >= $(version_code 2.16.51) )); then
                have_persistent_fset_cmd=true
+               subdir="thisisaverylongsubdirtotestlongfilesetsandtotestmultiplefilesetfragmentsonthenodemapiam_${nm}"
+       fi
 
        # setup
        if [[ "$nm" == "default" ]]; then
@@ -2334,9 +2338,6 @@ test_27a() {
        fi
 
        for nm in "default" "c0"; do
-               local subdir="thisisaverylongsubdirtotestlongfilesetsandtotestmultiplefilesetfragmentsonthenodemapiam_${nm}"
-               local subsubdir="subsubdir_${nm}"
-
                if [[ "$nm" == "default" && "$SHARED_KEY" == "true" ]]; then
                        echo "Skipping nodemap $nm with SHARED_KEY"
                        continue