]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/PyModuleRegistry: ignore 'obsolete' modules
authorSage Weil <sage@newdream.net>
Sat, 11 Apr 2020 14:51:46 +0000 (09:51 -0500)
committerSage Weil <sage@newdream.net>
Sat, 11 Apr 2020 18:36:51 +0000 (13:36 -0500)
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>
src/mgr/PyModuleRegistry.cc

index 2897684c4aedd20e6496477678dfe922617562e6..660774004a6a05525fe1e9fe2a603253a55506f1 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()) {