Whamcloud - gitweb
LU-15138 lnet: Fail peer add for existing gw peer 37/45337/5
authorChris Horn <chris.horn@hpe.com>
Fri, 22 Oct 2021 00:13:19 +0000 (00:13 +0000)
committerOleg Drokin <green@whamcloud.com>
Sat, 20 Nov 2021 06:26:51 +0000 (06:26 +0000)
commit79a4b69adb1e365b16eb8521c79ef1c6985c6b91
tree8a73b45a7603f50b6e78ea92b9ba6b15e5654f32
parentb8383035406a4b7bee2e6d8674eaef480b3e3b35
LU-15138 lnet: Fail peer add for existing gw peer

If there's an existing peer entry for a peer that is being added
via CLI, and that existing peer was not created via the CLI, then
DLC will attempt to delete the existing peer before creating a new
one. The exit status of the peer deletion was not being checked.
This results in the ability to add duplicate peers for gateways,
because gateways cannot be deleted via lnetctl unless the routes
for that gateway have been removed first.

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I9b7864a2bd21540336f72d96e180c89bd0aae8dc
Reviewed-on: https://review.whamcloud.com/45337
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/peer.c
lustre/tests/sanity-lnet.sh