]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm/upgrade: restart mgr after mons upgrade to pacific
authorSage Weil <sage@newdream.net>
Wed, 17 Feb 2021 17:39:25 +0000 (12:39 -0500)
committerSebastian Wagner <sebastian.wagner@suse.com>
Tue, 9 Mar 2021 09:18:49 +0000 (10:18 +0100)
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 <sage@newdream.net>
(cherry picked from commit 4d7dd0012962202532bde4fbc47554186c95b9fb)

src/mgr/ActivePyModules.cc
src/pybind/mgr/cephadm/upgrade.py

index 06b632957d5f2299b60bbde4ec1cd8a14349274a..e20241eb99c2e2e3e04dbd4a044624ff4f9a3fff 100644 (file)
@@ -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};
index e36706f63e1007097573586e70ddd86c79dccdeb..5865b833f4055ef7a6c62e5cf1b1943007453318 100644 (file)
@@ -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()