]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm/upgrade: restart mgr after mons upgrade to pacific 39504/head
authorSage Weil <sage@newdream.net>
Wed, 17 Feb 2021 17:39:25 +0000 (12:39 -0500)
committerSage Weil <sage@newdream.net>
Sun, 21 Feb 2021 00:05:29 +0000 (19:05 -0500)
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>
src/mgr/ActivePyModules.cc
src/pybind/mgr/cephadm/upgrade.py

index 02935c8b5f849f9f1c857a9b782b6442f2219a57..38e638e8af2ba7221af41a31dbe063319126224d 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()