]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
MDSMonitor: do not wipe old_max_mds when marked down twice
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 19 Apr 2018 18:52:50 +0000 (11:52 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 19 Apr 2018 18:52:50 +0000 (11:52 -0700)
Fixes: http://tracker.ceph.com/issues/23800
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mon/FSCommands.cc

index 09c4892dd2de83ea444909c9ccb5dfd5e23298ed..efaff5bddb31365b79ad23ae6f1fe552e4f84ab1 100644 (file)
@@ -389,8 +389,10 @@ public:
           [is_down](std::shared_ptr<Filesystem> 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);