]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/PyModuleRegistry: ignore 'obsolete' modules
authorSage Weil <sage@newdream.net>
Sat, 11 Apr 2020 14:51:46 +0000 (09:51 -0500)
committerNathan Cutler <ncutler@suse.com>
Fri, 13 Nov 2020 21:48:00 +0000 (22:48 +0100)
Old modules may be in the mgrmap (and always_on) but no longer exist.  Do
not try to load those or raise errors about them.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit a59f4e5deb49536af23473658e0f04d0f495829f)

src/mgr/PyModuleRegistry.cc

index 1ff92cd9ee4d3b53489adeb455d8f3c474212a0f..d74af406ed54867a331c5f6d4461cd890379ccc3 100644 (file)
@@ -32,7 +32,9 @@
 #undef dout_prefix
 #define dout_prefix *_dout << "mgr[py] "
 
-
+std::set<std::string> obsolete_modules = {
+  "orchestrator_cli",
+};
 
 void PyModuleRegistry::init()
 {
@@ -370,6 +372,9 @@ void PyModuleRegistry::get_health_checks(health_check_map_t *checks)
 
     // report failed always_on modules as health errors
     for (const auto& name : mgr_map.get_always_on_modules()) {
+      if (obsolete_modules.count(name)) {
+       continue;
+      }
       if (!active_modules->module_exists(name)) {
         if (failed_modules.find(name) == failed_modules.end() &&
             dependency_modules.find(name) == dependency_modules.end()) {