From ca8cf333e8dbe7e17b246d97bc55825ab94d7db5 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Wed, 7 Apr 2021 12:27:05 -0700 Subject: [PATCH] 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) --- src/mon/MDSMonitor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 011b61fff9d6f..40cb07127ac33 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. -- 2.39.5