From d1aecb3655fbcbd444954615dd8b54deb785fd8a Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Wed, 5 Apr 2023 10:02:49 -0400 Subject: [PATCH] mon/MDSMonitor: ignore extraneous up:boot messages 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 (cherry picked from commit 2e0bcc3c333d7fca2e06eafa1e3dc3a7c3ae1b36) --- src/mon/MDSMonitor.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 638612df88399..cceb0cde1c105 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -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; -- 2.39.5