From b29423111be8fcfc7702a39a7b0f6da43d12067f Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Thu, 4 Nov 2021 10:26:53 -0400 Subject: [PATCH] pybind/mgr/cephadm: disable FSMap sanity checks during MDS upgrade See comment for explanation. Fixes: https://tracker.ceph.com/issues/53155 Signed-off-by: Patrick Donnelly --- src/pybind/mgr/cephadm/upgrade.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/pybind/mgr/cephadm/upgrade.py b/src/pybind/mgr/cephadm/upgrade.py index 1cebe10651515..0236dbe1c14cb 100644 --- a/src/pybind/mgr/cephadm/upgrade.py +++ b/src/pybind/mgr/cephadm/upgrade.py @@ -584,6 +584,18 @@ class CephadmUpgrade: image_settings = self.get_distinct_container_image_settings() + # Older monitors (pre-v16.2.5) asserted that FSMap::compat == + # MDSMap::compat for all fs. This is no longer the case beginning in + # v16.2.5. We must disable the sanity checks during upgrade. + # N.B.: we don't bother confirming the operator has not already + # disabled this or saving the config value. + self.mgr.check_mon_command({ + 'prefix': 'config set', + 'name': 'mon_mds_skip_sanity', + 'value': '1', + 'who': 'mon', + }) + daemons = [d for d in self.mgr.cache.get_daemons() if d.daemon_type in CEPH_UPGRADE_ORDER] done = 0 for daemon_type in CEPH_UPGRADE_ORDER: @@ -877,6 +889,12 @@ class CephadmUpgrade: 'who': name_to_config_section(daemon_type), }) + self.mgr.check_mon_command({ + 'prefix': 'config rm', + 'name': 'mon_mds_skip_sanity', + 'who': 'mon', + }) + logger.info('Upgrade: Complete!') if self.upgrade_state.progress_id: self.mgr.remote('progress', 'complete', -- 2.39.5