From 4ab87e2eecbdcb4932775e871c3ae2f793880c20 Mon Sep 17 00:00:00 2001 From: Zhi Zhang Date: Thu, 4 Feb 2021 11:57:26 +0800 Subject: [PATCH] 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 --- src/mon/MDSMonitor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 37941970f92..43ee0a3a473 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 -- 2.39.5