Whamcloud - gitweb
LU-15595 tests: Router test interop check and aarch fix
authorChris Horn <chris.horn@hpe.com>
Wed, 14 Sep 2022 01:23:37 +0000 (20:23 -0500)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 29 Jul 2023 07:56:21 +0000 (07:56 +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-on: https://review.whamcloud.com/c/ex/lustre-release/+/51664
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
lnet/lnet/router.c
lustre/tests/sanity-lnet.sh

index 59560a0..d453d57 100644 (file)
@@ -1399,7 +1399,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,
@@ -1408,17 +1408,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,
@@ -1427,17 +1431,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,
@@ -1446,11 +1454,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 d24a9da..caea0f3 100755 (executable)
@@ -2282,6 +2282,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 $?
@@ -2294,6 +2297,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"