From: Amir Shehata Date: Wed, 15 Apr 2020 00:44:46 +0000 (-0700) Subject: LU-12312 lnet: handle no discovery flag X-Git-Tag: 2.13.54~164 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F29%2F38229%2F3;p=fs%2Flustre-release.git LU-12312 lnet: handle no discovery flag When a peer is being discovered, it could indicate that its discovery is disabled. In this case we shouldn't flag the peer for deletion. This operation is reserved for cases when the peer initiates a push to tell us that it has changed its status from discovery to no discovery. Fixes: 4577410165 ("LU-13028 lnet: advertise discovery when toggled") Signed-off-by: Amir Shehata Change-Id: I1d357555e234d828ba19b72fab1d041f93af548e Reviewed-on: https://review.whamcloud.com/38229 Tested-by: jenkins Reviewed-by: Serguei Smirnov Tested-by: Maloo Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin --- diff --git a/lnet/lnet/peer.c b/lnet/lnet/peer.c index f4c45ed..37a76c8 100644 --- a/lnet/lnet/peer.c +++ b/lnet/lnet/peer.c @@ -2032,7 +2032,8 @@ void lnet_peer_push_event(struct lnet_event *ev) * discovery disabled, we need to reflect that in our * representation of the peer. */ - if (!(lp->lp_state & LNET_PEER_NO_DISCOVERY)) + if (!(lp->lp_state & (LNET_PEER_NO_DISCOVERY | + LNET_PEER_DISCOVERING))) lp->lp_state |= LNET_PEER_MARK_DELETION; lp->lp_state |= LNET_PEER_NO_DISCOVERY; } else if (lp->lp_state & LNET_PEER_NO_DISCOVERY) { @@ -2331,13 +2332,6 @@ lnet_discovery_event_reply(struct lnet_peer *lp, struct lnet_event *ev) } else { CDEBUG(D_NET, "Peer %s has discovery disabled\n", libcfs_nid2str(lp->lp_primary_nid)); - /* - * If the peer is going from discovery enabled to - * discovery disabled, we need to reflect that in our - * representation of the peer. - */ - if (!(lp->lp_state & LNET_PEER_NO_DISCOVERY)) - lp->lp_state |= LNET_PEER_MARK_DELETION; lp->lp_state |= LNET_PEER_NO_DISCOVERY; } diff --git a/lustre/tests/sanity-sec.sh b/lustre/tests/sanity-sec.sh index f93895a..1999151 100755 --- a/lustre/tests/sanity-sec.sh +++ b/lustre/tests/sanity-sec.sh @@ -15,8 +15,8 @@ init_test_env $@ init_logging ALWAYS_EXCEPT="$SANITY_SEC_EXCEPT " -# bug number for skipped test: LU-12312 -ALWAYS_EXCEPT+=" 31" +# bug number for skipped test: +ALWAYS_EXCEPT+=" " # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! [ "$SLOW" = "no" ] && EXCEPT_SLOW="26"