Whamcloud - gitweb
LU-13041 lnet: fix router primary_nid deletion 18/36918/8
authorAmir Shehata <ashehata@whamcloud.com>
Sun, 1 Dec 2019 22:49:31 +0000 (14:49 -0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 24 Mar 2020 05:17:12 +0000 (05:17 +0000)
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 <ashehata@whamcloud.com>
Change-Id: I5928882dde513cb885301f632535282695429bb0
Reviewed-on: https://review.whamcloud.com/36918
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>

index 051a342..c6ac769 100644 (file)
@@ -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);
-               lp->lp_primary_nid = lpni->lpni_nid;
+               lp->lp_primary_nid = lpni2->lpni_nid;
        rc = lnet_peer_ni_del_locked(lpni, force);