]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MDSMonitor: ignore extraneous up:boot messages 52243/head
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 5 Apr 2023 14:02:49 +0000 (10:02 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 28 Jun 2023 15:44:26 +0000 (11:44 -0400)
An MDS sends up:boot beacons until it sees an MDSMap with it joined.  If
the mons are delaying the proposal, including because of quorum loss, of
the new FSMap, the subsequent up:boot messages would cause the
MDSMonitor to wrongly interpret the booting MDS to replace itself.
Instead, just ignore up:boot messages (as intended) when we know the MDS
has been added to the pending map.

Fixes: https://tracker.ceph.com/issues/59318
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 2e0bcc3c333d7fca2e06eafa1e3dc3a7c3ae1b36)

src/mon/MDSMonitor.cc

index 638612df8839967a2a0585b436b56c56ea8c929c..cceb0cde1c10577870af7d0542b66d2765331f85 100644 (file)
@@ -413,7 +413,14 @@ bool MDSMonitor::preprocess_beacon(MonOpRequestRef op)
       mon.send_reply(op, m.detach());
       return true;
     } else {
-      return false;  // not booted yet.
+      /* check if we've already recorded its entry in pending */
+      const auto& pending = get_pending_fsmap();
+      if (pending.gid_exists(gid)) {
+        /* MDS is already booted. */
+        goto ignore;
+      } else {
+        return false;  // not booted yet.
+      }
     }
   }
   dout(10) << __func__ << ": GID exists in map: " << gid << dendl;