From: Patrick Donnelly Date: Thu, 19 Apr 2018 18:52:50 +0000 (-0700) Subject: MDSMonitor: do not wipe old_max_mds when marked down twice X-Git-Tag: v13.1.0~138^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bee7a113c7577484bdedc300d2f5cb69128d1187;p=ceph.git MDSMonitor: do not wipe old_max_mds when marked down twice Fixes: http://tracker.ceph.com/issues/23800 Signed-off-by: Patrick Donnelly --- diff --git a/src/mon/FSCommands.cc b/src/mon/FSCommands.cc index 09c4892dd2de..efaff5bddb31 100644 --- a/src/mon/FSCommands.cc +++ b/src/mon/FSCommands.cc @@ -389,8 +389,10 @@ public: [is_down](std::shared_ptr fs) { if (is_down) { - fs->mds_map.set_old_max_mds(); - fs->mds_map.set_max_mds(0); + if (fs->mds_map.get_max_mds() > 0) { + fs->mds_map.set_old_max_mds(); + fs->mds_map.set_max_mds(0); + } /* else already down! */ } else { mds_rank_t oldmax = fs->mds_map.get_old_max_mds(); fs->mds_map.set_max_mds(oldmax ? oldmax : 1);