Whamcloud - gitweb
LU-14668 lnet: don't delete peer created by Lustre
authorAmir Shehata <ashehata@whamcloud.com>
Thu, 6 May 2021 06:02:22 +0000 (23:02 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 28 Feb 2023 04:20:01 +0000 (04:20 +0000)
commit40e3dc586e316b2e8caff44d6dab2fd38b1ebc4c
tree8a2bf09217b34a2122f1f48be222f7a750082789
parentce22e31b75f30e732fb586300d987aa71cb2c3ac
LU-14668 lnet: don't delete peer created by Lustre

Peers created by Lustre have their primary NIDs locked.
If that peer is deleted, it'll confuse lustre. So when manually
deleting a peer using:
   lnetctl peer del --prim_nid ...
We must continue to preserve the primary NID. Therefore we delete
all the constituent NIDs, but keep the primary NID. We then
flag the peer for rediscovery.

Lustre-change: https://review.whamcloud.com/43565
Lustre-commit: TBD (83f66616e303039974e7ed6ec07140dcc17f0cea)

Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Change-Id: I34eef9b0049435a01fde87dc8263dd50f631c551
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/50117
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lnet/lnet/peer.c