]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
MDSMonitor: do not assign standby-replay when degraded 26642/head
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 15 Feb 2019 19:57:43 +0000 (11:57 -0800)
committerPrashant D <pdhange@redhat.com>
Tue, 26 Feb 2019 00:06:19 +0000 (19:06 -0500)
The journal (or potentially other rank metadata) may be in the process of being
migrated or modified.

Fixes: http://tracker.ceph.com/issues/36384
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 065e98edfb26c1bbf9779e1094b966ac428247c5)

src/mon/MDSMonitor.cc

index 7be5f14f77a65b808a1103974a4829587eb50b46..4cc066fc6ec7ec9ed0ca676d76de8f36629f5fd3 100644 (file)
@@ -2173,9 +2173,10 @@ bool MDSMonitor::maybe_promote_standby(FSMap &fsmap, std::shared_ptr<Filesystem>
        do_propose = true;
       }
     }
-  } else {
+  } else if (!fs->mds_map.is_degraded()) {
     // There were no failures to replace, so try using any available standbys
-    // as standby-replay daemons.
+    // as standby-replay daemons. Don't do this when the cluster is degraded
+    // as a standby-replay daemon may try to read a journal being migrated.
 
     // Take a copy of the standby GIDs so that we can iterate over
     // them while perhaps-modifying standby_daemons during the loop