From: Patrick Donnelly Date: Wed, 7 Apr 2021 19:27:05 +0000 (-0700) Subject: mon: check mdsmap is resizeable before promoting standby-replay X-Git-Tag: v17.1.0~2300^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=e1748e7a8399f862accf35ba21a63a8e1ae8bd4f;p=ceph.git mon: check mdsmap is resizeable before promoting standby-replay 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 --- diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 38c16d6304501..695ca0aa715d1 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -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.