Merge PR #60327 into main

* refs/pull/60327/head:
	mon/MDSMonitor: send reply to beacons with `state=DNE`

Reviewed-by: Patrick Donnelly <pdonnell@ibm.com>
This commit is contained in:
Patrick Donnelly 2024-11-12 22:16:54 -05:00
commit 8ae8988275
No known key found for this signature in database
GPG Key ID: FA47FD0B0367D313
1 changed files with 8 additions and 0 deletions

View File

@ -758,6 +758,14 @@ bool MDSMonitor::prepare_beacon(MonOpRequestRef op)
if (state == MDSMap::STATE_DNE) {
dout(1) << __func__ << ": DNE from " << info << dendl;
/* send a beacon reply so MDSDaemon::suicide() finishes the
Beacon::send_and_wait() call */
auto beacon = make_message<MMDSBeacon>(mon.monmap->fsid,
m->get_global_id(), m->get_name(), get_fsmap().get_epoch(),
m->get_state(), m->get_seq(), CEPH_FEATURES_SUPPORTED_DEFAULT);
mon.send_reply(op, beacon.detach());
goto evict;
}