From c902ebe7e89130f7aceaaf664074d74760b30926 Mon Sep 17 00:00:00 2001 From: John Spray Date: Mon, 18 Sep 2017 13:16:40 -0400 Subject: [PATCH] mon/MDSMonitor: fix clog msgs on MDS rank add/rm Because these were generated before the actual change, the get_num_in values did not make sense. Fixes: http://tracker.ceph.com/issues/21421 Signed-off-by: John Spray (cherry picked from commit 511439b515414ae93d791f54a187e44d5fdffa7b) --- src/mon/MDSMonitor.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index f38c1e91fd9..32a80a7b8b1 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -666,10 +666,11 @@ bool MDSMonitor::prepare_beacon(MonOpRequestRef op) if (state == MDSMap::STATE_STOPPED) { const auto fscid = pending_fsmap.mds_roles.at(gid); auto fs = pending_fsmap.get_filesystem(fscid); + mon->clog->info() << info.human_name() << " finished " << "deactivating rank " << info.rank << " in filesystem " << fs->mds_map.fs_name << " (now has " - << fs->mds_map.get_num_in_mds() << " ranks)"; + << fs->mds_map.get_num_in_mds() - 1 << " ranks)"; auto erased = pending_fsmap.stop(gid); erased.push_back(gid); @@ -2016,7 +2017,7 @@ bool MDSMonitor::maybe_expand_cluster(std::shared_ptr fs) mon->clog->info() << new_info.human_name() << " assigned to " "filesystem " << fs->mds_map.fs_name << " as rank " - << mds << " (now has " << fs->mds_map.get_num_in_mds() + << mds << " (now has " << fs->mds_map.get_num_in_mds() + 1 << " ranks)"; pending_fsmap.promote(newgid, fs, mds); do_propose = true; -- 2.47.3