]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MDSMonitor: fix clog msgs on MDS rank add/rm 17783/head
authorJohn Spray <john.spray@redhat.com>
Mon, 18 Sep 2017 17:16:40 +0000 (13:16 -0400)
committerJohn Spray <john.spray@redhat.com>
Mon, 18 Sep 2017 21:30:28 +0000 (17:30 -0400)
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 <john.spray@redhat.com>
src/mon/MDSMonitor.cc

index 61a93e20cb3f3bbecfca73bfd025d002f1266c27..028a4a45b079cdb95f7e938e745aa2315b253b7a 100644 (file)
@@ -645,10 +645,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);
@@ -1942,7 +1943,7 @@ bool MDSMonitor::maybe_expand_cluster(std::shared_ptr<Filesystem> 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;