Whamcloud - gitweb
LU-16870 tests: Make 413a/b work on server 2.14 with client master 68/56768/4
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Wed, 23 Oct 2024 11:08:52 +0000 (07:08 -0400)
committerOleg Drokin <green@whamcloud.com>
Sat, 26 Oct 2024 23:56:06 +0000 (23:56 +0000)
This patch makes 413a/b interop work on server 2.14
with client master.

First, this patch removes general redirect of cmd execution
(fallocate/dd) to dev/null from generate_uneven_mdts(). For
'dd' it might get little verbose however on failure it will
dump output to stdout giving more info.

Second, it adds check under check_fallocate_supported() to check
is fallocate is issued on MDS. If yes it check for version when
this feature was added. If not it falls back to 'dd' command

Third, under unload_modules() it check for version where
unload_modules_local() was added. If not it falls back to
non-unload_modules_local() version to unload module.

Test-Parameters: trivial testlist=sanity serverversion=2.14 env=ONLY=413a,413b,ONLY_REPEAT=10
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I8a8843dd32f7e88d6d0938b67ce24353c9f9cb65
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56768
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Deiter <adeiter@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh
lustre/tests/test-framework.sh

index 45d33b9..26dec88 100755 (executable)
@@ -30136,7 +30136,7 @@ generate_uneven_mdts() {
                        error "setstripe $testdir failed"
                start=$SECONDS
                for (( f = 0; f < TEST413_COUNT; f++ )); do
-                       $cmd$testdir/f.$f &> /dev/null || error "$cmd $f failed"
+                       $cmd$testdir/f.$f || error "$cmd$testdir $f failed"
                done
                sync; sleep 1; sync
 
index e06e5f7..80366b2 100755 (executable)
@@ -1218,9 +1218,22 @@ unload_modules() {
 
        if $LOAD_MODULES_REMOTE; then
                local list=$(comma_list $(remote_nodes_list))
-               if [ -n "$list" ]; then
-                       echo "unloading modules on: '$list'"
-                       do_rpc_nodes "$list" unload_modules_local
+
+               if (( MDS1_VERSION >= $(version_code 2.15.51) )); then
+                       # unload_module_local is only available after 2.15.51
+                       if [ -n "$list" ]; then
+                               echo "unloading modules via unload_modules_local on: '$list'"
+                               do_rpc_nodes "$list" unload_modules_local
+                       fi
+               else
+                       if [ -n "$list" ]; then
+                               echo "unloading modules on: '$list'"
+                               do_rpc_nodes "$list" $LUSTRE_RMMOD ldiskfs
+                               do_rpc_nodes "$list" check_mem_leak
+                               do_rpc_nodes "$list" "rm -f /etc/udev/rules.d/99-lustre-test.rules"
+                               do_rpc_nodes "$list" "udevadm control --reload-rules"
+                               do_rpc_nodes "$list" "udevadm trigger"
+                       fi
                fi
        fi
 
@@ -12036,6 +12049,9 @@ function check_fallocate_supported()
        local fa_mode="osd-ldiskfs.$(facet_svc $facet).fallocate_zero_blocks"
        local mode=$(do_facet $facet $LCTL get_param -n $fa_mode 2>/dev/null |
                     head -n 1)
+       ! [[ "$facet" =~ "mds" ]] || # older MDS doesn't support fallocate
+               (( MDS1_VERSION >= $(version_code v2_14_53-10-g163870abfb) )) ||
+                       mode=""
 
        if [[ -z "$mode" ]]; then
                echo "fallocate not supported on $facet" 1>&2