Whamcloud - gitweb
LU-15595 tests: Router test interop check and aarch fix 78/48578/9
authorChris Horn <chris.horn@hpe.com>
Wed, 14 Sep 2022 01:23:37 +0000 (20:23 -0500)
committerOleg Drokin <green@whamcloud.com>
Mon, 10 Oct 2022 05:38:12 +0000 (05:38 +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.

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/fs/lustre-release/+/48578
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/router.c
lustre/tests/sanity-lnet.sh

index 3960785..23c901b 100644 (file)
@@ -1404,7 +1404,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,
@@ -1413,17 +1413,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,
@@ -1432,17 +1436,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,
@@ -1451,11 +1459,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 7c47dc8..0d89f20 100755 (executable)
@@ -2555,6 +2555,9 @@ setup_router_test() {
        local mod_opts="$1"
        local rtr_net_opts="$2"
 
+       (( $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 $?
@@ -2567,6 +2570,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"