Whamcloud - gitweb
LU-13750 lnet: Fix peer add command 92/39392/6
authorAmir Shehata <ashehata@whamcloud.com>
Tue, 14 Jul 2020 17:51:51 +0000 (10:51 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 25 Aug 2020 07:40:39 +0000 (07:40 +0000)
commit30f6c3d601fb9e7bc5af8dfc7a6a4abd404aea18
tree6c1d443f40b51e918550b546780382d287148f42
parent47520731dd9c4abc44c624515e1975b49a2c37a9
LU-13750 lnet: Fix peer add command

The peer add command is suppose to add one peer per command.
The primary NID can be specified followed by a set of constituent
NIDs. This patch restores this behavior and ensures that for
peer add the primary NID must be specified to make the command
syntax more consistent with the peer del command. And behave in
a similar way as net add/del commands.

The APIs have been changed as well to make it more easily testable
from the LUTF.

There a few cleanups to avoid having to do unnecessary parsing.

Test-Parameters: trivial testlist=sanity-lnet
Fixes: 892f675e660 (LU-12410 lnet: Convert lnetctl peer add and del)
Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Change-Id: I32ed53742f2c379abb47f7acd3f7f336062e0458
Reviewed-on: https://review.whamcloud.com/39392
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/utils/lnetconfig/liblnetconfig.c
lnet/utils/lnetconfig/liblnetconfig.h
lnet/utils/lnetctl.c
lustre/doc/lnetctl.8
lustre/tests/sanity-lnet.sh