Whamcloud - gitweb
LU-9680 lnet: Empty route/peer table is not an error 66/53366/4
authorChris Horn <chris.horn@hpe.com>
Tue, 5 Dec 2023 07:38:12 +0000 (01:38 -0600)
committerOleg Drokin <green@whamcloud.com>
Wed, 3 Jan 2024 03:01:51 +0000 (03:01 +0000)
commit0031ab371ddd0ffda157629fb64c101203a3b1e2
tree6fa2599f8c9f1278b3a85f6763bddbe8160ba0e3
parentc384a39d2889e93229813a204f7de5ca5f6bd142
LU-9680 lnet: Empty route/peer table is not an error

lnetctl peer/route show command, without any other arguments,  should
not return an error if the peer/route tables are empty. If the user
specifies a particular peer/route to show, and that peer/route does
not exist then this is an error.

Modify the dumpit routines to check the netlink message length to
determine whether the user supplied any arguments to the show
commands, and use this information to return the proper status. Some
dead code was also removed from lnet_route_show_dump().

We also fix an issue with older kernels where non-zero return status
from old dumpit commands was not being returned correctly.

Test-Parameters: trivial
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I9a188c573b0f373052208dbea52ea56181719769
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53366
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
lnet/lnet/api-ni.c
lnet/selftest/conctl.c