Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-21288

lnet: discovery-off push deletes a configured peer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • None
    • 3
    • 9223372036854775807

      A push from a peer with discovery off can delete a peer that the user configured with lnetctl peer add. A ping reply with the same content does not delete that peer.

      Problem

      lnet_discovery_event_reply() keeps a peer that has LNET_PEER_CONFIGURED set. LU-14661 added this rule. The matching check in lnet_peer_push_event() is older than LU-14661, and it does not test LNET_PEER_CONFIGURED:

      if (!(lp->lp_state & (LNET_PEER_NO_DISCOVERY |
                            LNET_PEER_LOCK_PRIMARY |
                            LNET_PEER_DISCOVERING)) &&
           lp->lp_state & LNET_PEER_DISCOVERED) {
              ...
              lp->lp_state |= LNET_PEER_MARK_DELETION;
      }
      

      The sequence:

      1. The user adds a peer with lnetctl peer add. Discovery on the local node then discovers the peer.
      2. The remote node turns discovery off. lnet_set_peer_discovery() calls lnet_push_update_to_peers(1), and the remote node pushes to its Multi-Rail peers.
      3. lnet_peer_push_event() on the local node sets LNET_PEER_MARK_DELETION.
      4. The discovery thread calls lnet_peer_deletion(), which calls lnet_peer_del_locked(). That function deletes the configured peer and all its peer NIs.

      The local node thus loses the user configuration. Traffic later creates a new peer that has no LNET_PEER_CONFIGURED flag and none of the configured NIDs.

      Proposed fix

      Add LNET_PEER_CONFIGURED to the push check, so that both paths keep a configured peer. Add a test that configures a peer on a second node, discovers it, turns discovery off on that node, and checks that the peer stays.

      Source

      The Gerrit AI review found this case on https://review.whamcloud.com/70549 (LU-21145), which changes the same check. The finding is from the source only. Nobody has reproduced it at runtime yet.

            wc-triage WC Triage
            hornc Chris Horn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: