Whamcloud - gitweb
LU-17006 lnet: set up routes for going across subnets
authorSerguei Smirnov <ssmirnov@whamcloud.com>
Fri, 11 Aug 2023 00:58:11 +0000 (17:58 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Sun, 5 Nov 2023 10:43:58 +0000 (10:43 +0000)
commit01e3b749fc249e0a2c910085a8607abea777de8e
treea57f704573ef4037b27a70512ae8820b97a5d6ed
parent6fc6c2dc29ae179720cc6646b72d858347fe8a46
LU-17006 lnet: set up routes for going across subnets

Modify ksocklnd-config to set up route which features
default gateway for the subnet in case if default gateway
is defined, for example:
        ip route add default via <gw_for_eth0> dev eth0 table eth0
which results in a route similar to the following added to
the eth0 route table:
        default via <gw_for_eth0> dev eth0

If there's no gateway found for the eth0 subnet, keep the old
behaviour which results in the following added to eth0
route table:
        <eth0_subnet> dev eth0 proto kernel scope link src <eth0_ip>

This makes sure that MR traffic goes out the intended interface
as selected by LNet no matter whether going across subnets or not.

Lustre-change: https://review.whamcloud.com/51921
Lustre-commit: 7f60b2b5580f67ca55e53a78dbaf7d50b5b7ab47

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: I84a299c8b7eb4cdb4fc24408a1e42ad0283d9219
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52190
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/scripts/ksocklnd-config