]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: check mdsmap is resizeable before promoting standby-replay 40852/head
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 7 Apr 2021 19:27:05 +0000 (12:27 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 21 Apr 2021 17:16:09 +0000 (10:16 -0700)
If any MDS is up:creating, some rank data structures may not exist yet.

Fixes: https://tracker.ceph.com/issues/50215
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit e1748e7a8399f862accf35ba21a63a8e1ae8bd4f)

src/mon/MDSMonitor.cc

index 011b61fff9d6fdaf257a27d615ec0a1d33e3f74f..40cb07127ac339fd0885cbc7796d2e28013ffb95 100644 (file)
@@ -2240,7 +2240,7 @@ bool MDSMonitor::maybe_promote_standby(FSMap &fsmap, Filesystem& fs)
     }
   }
 
-  if (!fs.mds_map.is_degraded() && fs.mds_map.allows_standby_replay()) {
+  if (fs.mds_map.is_resizeable() && fs.mds_map.allows_standby_replay()) {
     // There were no failures to replace, so try using any available standbys
     // 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.