From a59f4e5deb49536af23473658e0f04d0f495829f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 11 Apr 2020 09:51:46 -0500 Subject: [PATCH] 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 --- src/mgr/PyModuleRegistry.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mgr/PyModuleRegistry.cc b/src/mgr/PyModuleRegistry.cc index 2897684c4aedd..660774004a6a0 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()) { -- 2.39.5