From: Sage Weil Date: Wed, 17 Feb 2021 17:39:25 +0000 (-0500) Subject: mgr/cephadm/upgrade: restart mgr after mons upgrade to pacific X-Git-Tag: v17.1.0~2900^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F39504%2Fhead;p=ceph.git 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 --- diff --git a/src/mgr/ActivePyModules.cc b/src/mgr/ActivePyModules.cc index 02935c8b5f84..38e638e8af2b 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 e36706f63e10..5865b833f405 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()