From: Sage Weil Date: Sat, 11 Apr 2020 14:51:46 +0000 (-0500) Subject: mgr/PyModuleRegistry: ignore 'obsolete' modules X-Git-Tag: v14.2.14~3^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a36cefadb002779ef0a43f9f331c1b5cc4c193df;p=ceph.git mgr/PyModuleRegistry: ignore 'obsolete' modules 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 (cherry picked from commit a59f4e5deb49536af23473658e0f04d0f495829f) --- diff --git a/src/mgr/PyModuleRegistry.cc b/src/mgr/PyModuleRegistry.cc index 1ff92cd9ee4..d74af406ed5 100644 --- a/src/mgr/PyModuleRegistry.cc +++ b/src/mgr/PyModuleRegistry.cc @@ -32,7 +32,9 @@ #undef dout_prefix #define dout_prefix *_dout << "mgr[py] " - +std::set 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()) {