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: v17.1.0~3010^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4ab87e2eecbdcb4932775e871c3ae2f793880c20;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 --- diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 37941970f927..43ee0a3a4730 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -665,7 +665,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()); @@ -674,6 +673,7 @@ bool MDSMonitor::prepare_beacon(MonOpRequestRef op) } new_info.join_fscid = fscid; } + pending.insert(new_info); } // initialize the beacon timer