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: v16.2.2~15^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F40852%2Fhead;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 (cherry picked from commit e1748e7a8399f862accf35ba21a63a8e1ae8bd4f) --- diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 011b61fff9d6..40cb07127ac3 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.