Whamcloud - gitweb
LU-14668 lnet: don't delete peer created by Lustre 65/43565/8
authorAmir Shehata <ashehata@whamcloud.com>
Thu, 6 May 2021 06:02:22 +0000 (23:02 -0700)
committerSerguei Smirnov <ssmirnov@whamcloud.com>
Sat, 25 Feb 2023 01:31:56 +0000 (17:31 -0800)
commit83f66616e303039974e7ed6ec07140dcc17f0cea
treeab9e46797a8b480a5749fbc1c9e15aeb52ac64f7
parentf5008e02d8a49525b5d85887a13aad27e4a23cfd
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.

Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Change-Id: I34eef9b0049435a01fde87dc8263dd50f631c551
lnet/lnet/peer.c