Whamcloud - gitweb
LU-14662 lnet: set eth routes needed for multi rail
authorSerguei Smirnov <ssmirnov@whamcloud.com>
Wed, 23 Jun 2021 22:51:21 +0000 (15:51 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 19 Jan 2022 21:04:13 +0000 (21:04 +0000)
commit45ea1587cc2702f169dc23d8dbb3cb23ec19d4f6
tree36765d49a8e8a163efe71c88a5f369dfee2c8eb4
parent08a8a818d4d5e13881aed801422cb3aa39e99bd0
LU-14662 lnet: set eth routes needed for multi rail

When ksocklnd is initialized or new ethernet interfaces
are added via lnetctl, set the routing rules using a common
shell script ksocklnd-config. This ensures control over
source interface when sending traffic.

For example, for eth0 with ip 192.168.122.142/24:
   the output of "ip route show table eth0" should be
192.168.122.0/24 dev eth0 proto kernel scope link src 192.168.122.142

This step can be omitted by specifying
   options ksocklnd skip_mr_route_setup=1
in the conf file, or by using switch
   --skip-mr-route-setup
when adding NI with lnetctl. Note that the module parameter
takes priority over the lnetctl switch: if skip-mr-route-setup
is not specified when adding NI with lnetctl, the route still
won't get created if the conf file has skip_mr_route_setup=1.

The route also won't be created if any route already exists
for the given interface, assuming advanced users who manage
routing on their own will want to continue doing so.

Lustre-change: https://review.whamcloud.com/44065
Lustre-commit: c9bfe57bd2495671fa66eb7e52184f76e1f4a6eb

Test-Parameters: trivial
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: Ia14e637bd29d4bbce5dd93daad9992336b2e6b15
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45678
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lnet/klnds/socklnd/socklnd_modparams.c
lnet/utils/lnetconfig/liblnetconfig.c
lnet/utils/lnetconfig/liblnetconfig.h
lnet/utils/lnetctl.c
lustre/conf/99-lustre.rules
lustre/scripts/Makefile.am
lustre/scripts/ksocklnd-config [new file with mode: 0755]
lustre/tests/sanity-lnet.sh
lustre/tests/test-framework.sh