Whamcloud - gitweb
LU-12312 lnet: handle no discovery flag 29/38229/3
authorAmir Shehata <ashehata@whamcloud.com>
Wed, 15 Apr 2020 00:44:46 +0000 (17:44 -0700)
committerOleg Drokin <green@whamcloud.com>
Thu, 23 Apr 2020 16:49:37 +0000 (16:49 +0000)
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 <ashehata@whamcloud.com>
Change-Id: I1d357555e234d828ba19b72fab1d041f93af548e
Reviewed-on: https://review.whamcloud.com/38229
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/peer.c
lustre/tests/sanity-sec.sh

index f4c45ed..37a76c8 100644 (file)
@@ -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;
        }
 
index f93895a..1999151 100755 (executable)
@@ -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"