From: Patrick Donnelly Date: Wed, 5 Apr 2023 14:02:49 +0000 (-0400) Subject: mon/MDSMonitor: ignore extraneous up:boot messages X-Git-Tag: v16.2.14~37^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1cc8b9df175c72064784d70235bc3eb3f0a8b97d;p=ceph.git 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) --- diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 2ec7a2018409..4f19e09f96e5 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;