Whamcloud - gitweb
LU-15595 tests: Router test interop check and aarch fix 46/51546/3
authorChris Horn <chris.horn@hpe.com>
Wed, 14 Sep 2022 01:23:37 +0000 (20:23 -0500)
committerOleg Drokin <green@whamcloud.com>
Sun, 16 Jun 2024 03:34:43 +0000 (03:34 +0000)
setup_router_test() executes load_lnet() on remote nodes, but
this function was only added in 2.15. Add a version check for it.

Enabling routing may fail on nodes with small amount of memory (like
aarch config). Define small number of router buffers to work around
this issue. Modify the functions which calculate the number of buffers
to allow small sizes to be specified via parameters.

Lustre-change: https://review.whamcloud.com/48578
Lustre-commit: 1aba6b0d9b661d3699cbd4624e9db334a13fc647

Test-Parameters: trivial testlist=sanity-lnet serverversion=2.12.9
Test-Parameters: testgroup=review-ldiskfs-arm testlist=sanity-lnet
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: If0b76747fe09e883546f18da9f3322c72263e29d
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51546
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
lnet/lnet/router.c
lustre/tests/sanity-lnet.sh

index 196d1d0..026b337 100644 (file)
@@ -1464,7 +1464,7 @@ lnet_rtrpools_free(int keep_pools)
 static int
 lnet_nrb_tiny_calculate(void)
 {
-       int     nrbs = LNET_NRB_TINY;
+       int nrbs = LNET_NRB_TINY;
 
        if (tiny_router_buffers < 0) {
                LCONSOLE_ERROR_MSG(0x10c,
@@ -1473,17 +1473,21 @@ lnet_nrb_tiny_calculate(void)
                return -EINVAL;
        }
 
-       if (tiny_router_buffers > 0)
+       if (tiny_router_buffers > 0) {
+               if (tiny_router_buffers < LNET_NRB_TINY_MIN)
+                       CWARN("tiny_router_buffers=%d less than recommended minimum %d\n",
+                             tiny_router_buffers, LNET_NRB_TINY_MIN);
                nrbs = tiny_router_buffers;
+       }
 
        nrbs /= LNET_CPT_NUMBER;
-       return max(nrbs, LNET_NRB_TINY_MIN);
+       return max(nrbs, 1);
 }
 
 static int
 lnet_nrb_small_calculate(void)
 {
-       int     nrbs = LNET_NRB_SMALL;
+       int nrbs = LNET_NRB_SMALL;
 
        if (small_router_buffers < 0) {
                LCONSOLE_ERROR_MSG(0x10c,
@@ -1492,17 +1496,21 @@ lnet_nrb_small_calculate(void)
                return -EINVAL;
        }
 
-       if (small_router_buffers > 0)
+       if (small_router_buffers > 0) {
+               if (small_router_buffers < LNET_NRB_SMALL_MIN)
+                       CWARN("small_router_buffers=%d less than recommended minimum %d\n",
+                             small_router_buffers, LNET_NRB_SMALL_MIN);
                nrbs = small_router_buffers;
+       }
 
        nrbs /= LNET_CPT_NUMBER;
-       return max(nrbs, LNET_NRB_SMALL_MIN);
+       return max(nrbs, 1);
 }
 
 static int
 lnet_nrb_large_calculate(void)
 {
-       int     nrbs = LNET_NRB_LARGE;
+       int nrbs = LNET_NRB_LARGE;
 
        if (large_router_buffers < 0) {
                LCONSOLE_ERROR_MSG(0x10c,
@@ -1511,11 +1519,15 @@ lnet_nrb_large_calculate(void)
                return -EINVAL;
        }
 
-       if (large_router_buffers > 0)
+       if (large_router_buffers > 0) {
+               if (large_router_buffers < LNET_NRB_LARGE_MIN)
+                       CWARN("large_router_buffers=%d less than recommended minimum %d\n",
+                             large_router_buffers, LNET_NRB_LARGE_MIN);
                nrbs = large_router_buffers;
+       }
 
        nrbs /= LNET_CPT_NUMBER;
-       return max(nrbs, LNET_NRB_LARGE_MIN);
+       return max(nrbs, 1);
 }
 
 int
index 88f2b81..40e3a24 100755 (executable)
@@ -2499,6 +2499,9 @@ REMOTE_NET=${NETTYPE}2
 setup_router_test() {
        local mod_opts="$@"
 
+       (( $MDS1_VERSION >= $(version_code 2.15.0) )) ||
+               skip "need at least 2.15.0 for load_lnet"
+
        if [[ ${#RPEER_INTERFACES[@]} -eq 0 ]]; then
                init_router_test_vars ||
                        return $?
@@ -2511,6 +2514,9 @@ setup_router_test() {
 
        mod_opts+=" alive_router_check_interval=5"
        mod_opts+=" router_ping_timeout=5"
+       mod_opts+=" large_router_buffers=4"
+       mod_opts+=" small_router_buffers=8"
+       mod_opts+=" tiny_router_buffers=16"
        do_rpc_nodes $all_nodes load_lnet "${mod_opts}" ||
                error "Failed to load lnet"