Whamcloud - gitweb
LU-14662 lnet: set eth routes needed for multi rail 65/44065/15
authorSerguei Smirnov <ssmirnov@whamcloud.com>
Wed, 23 Jun 2021 22:51:21 +0000 (15:51 -0700)
committerOleg Drokin <green@whamcloud.com>
Sat, 20 Nov 2021 06:28:23 +0000 (06:28 +0000)
commitc9bfe57bd2495671fa66eb7e52184f76e1f4a6eb
tree89c8357a7b5cd6bd63f7f8041b34f844cc2917be
parenteba1b49172259ece89ab604a2ed2285e4770baa2
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.

Test-Parameters: trivial
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: Ia14e637bd29d4bbce5dd93daad9992336b2e6b15
Reviewed-on: https://review.whamcloud.com/44065
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@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