From 63d9de69f8277a733ee254ad2f243beb7e789cc1 Mon Sep 17 00:00:00 2001 From: Amir Shehata Date: Sun, 1 Dec 2019 14:49:31 -0800 Subject: [PATCH] LU-13041 lnet: fix router primary_nid deletion For MR routers it is possible to update the primary_nid. This will result in a push to update the peers of the changes. The peer should be able to update the primary_nid of the router. When the peer receives the push notifications and deletes the primary NID of the router, it should update the router's primary NID to be the next peer NI in the list. Test-parameters: trivial Signed-off-by: Amir Shehata Change-Id: I5928882dde513cb885301f632535282695429bb0 Reviewed-on: https://review.whamcloud.com/36918 Reviewed-by: Serguei Smirnov Reviewed-by: Chris Horn Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lnet/lnet/peer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnet/lnet/peer.c b/lnet/lnet/peer.c index 051a342..c6ac769a 100644 --- a/lnet/lnet/peer.c +++ b/lnet/lnet/peer.c @@ -525,7 +525,7 @@ lnet_peer_del_nid(struct lnet_peer *lp, lnet_nid_t nid, unsigned flags) /* assign the next peer_ni to be the primary */ lpni2 = lnet_get_next_peer_ni_locked(lp, NULL, lpni); LASSERT(lpni2); - lp->lp_primary_nid = lpni->lpni_nid; + lp->lp_primary_nid = lpni2->lpni_nid; } rc = lnet_peer_ni_del_locked(lpni, force); -- 1.8.3.1