]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: check mdsmap is resizeable before promoting standby-replay 40653/head
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 7 Apr 2021 19:27:05 +0000 (12:27 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 8 Apr 2021 18:24:49 +0000 (11:24 -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>
src/mon/MDSMonitor.cc

index 38c16d6304501f4033532f2ca7b1cb586a3ddad9..695ca0aa715d1c4dba05eba245c9fe756567c791 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.