From 4d7dd0012962202532bde4fbc47554186c95b9fb Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 17 Feb 2021 12:39:25 -0500 Subject: [PATCH] mgr/cephadm/upgrade: restart mgr after mons upgrade to pacific If we are upgrading to pacific, we need to restart the mgr *after* the mons have a pacific quorum so that they can get the kv subscriptions. Signed-off-by: Sage Weil --- src/mgr/ActivePyModules.cc | 4 ++++ src/pybind/mgr/cephadm/upgrade.py | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/mgr/ActivePyModules.cc b/src/mgr/ActivePyModules.cc index 02935c8b5f849..38e638e8af2ba 100644 --- a/src/mgr/ActivePyModules.cc +++ b/src/mgr/ActivePyModules.cc @@ -486,6 +486,10 @@ PyObject *ActivePyModules::get_python(const std::string &what) mgr_map.dump(&f); return f.get(); }); + } else if (what == "have_local_config_map") { + with_gil_t with_gil{no_gil}; + f.dump_bool("have_local_config_map", have_local_config_map); + return f.get(); } else { derr << "Python module requested unknown data '" << what << "'" << dendl; with_gil_t with_gil{no_gil}; diff --git a/src/pybind/mgr/cephadm/upgrade.py b/src/pybind/mgr/cephadm/upgrade.py index e36706f63e100..5865b833f4055 100644 --- a/src/pybind/mgr/cephadm/upgrade.py +++ b/src/pybind/mgr/cephadm/upgrade.py @@ -511,6 +511,12 @@ class CephadmUpgrade: }) return + # complete mon upgrade? + if daemon_type == 'mon': + if not self.mgr.get("have_local_config_map"): + logger.info('Upgrade: Restarting mgr now that mons are runnig pacific') + need_upgrade_self = True + if need_upgrade_self: try: self.mgr.mgr_service.fail_over() -- 2.47.3