From: Zhi Zhang Date: Thu, 4 Feb 2021 03:57:26 +0000 (+0800) Subject: mon/MDSMonitor.cc: fix join fscid not applied with pending fsmap at boot X-Git-Tag: v16.2.6~47^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0118b953a589fccae9b86c785618e5c2d8b35903;p=ceph.git mon/MDSMonitor.cc: fix join fscid not applied with pending fsmap at boot Fixes: https://tracker.ceph.com/issues/49157 Signed-off-by: Zhi Zhang (cherry picked from commit 4ab87e2eecbdcb4932775e871c3ae2f793880c20) --- diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index fca12925240f..ce542c4d8df6 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -673,7 +673,6 @@ bool MDSMonitor::prepare_beacon(MonOpRequestRef op) new_info.mds_features = m->get_mds_features(); new_info.state = MDSMap::STATE_STANDBY; new_info.state_seq = seq; - pending.insert(new_info); if (m->get_fs().size()) { fs_cluster_id_t fscid = FS_CLUSTER_ID_NONE; auto f = pending.get_filesystem(m->get_fs()); @@ -682,6 +681,7 @@ bool MDSMonitor::prepare_beacon(MonOpRequestRef op) } new_info.join_fscid = fscid; } + pending.insert(new_info); } // initialize the beacon timer