From: Neha Ojha Date: Thu, 3 Dec 2020 20:34:53 +0000 (+0000) Subject: mgr: don't add config values to mgr log in config_callback and module_config X-Git-Tag: v14.2.17~113^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=08ab75a3e06408d671f88611043a7824b5be6d1f;p=ceph.git mgr: don't add config values to mgr log in config_callback and module_config The original code has been commented out and left for future debugging purposes. Signed-off-by: Neha Ojha (cherry picked from commit 19000fad573138b2b0576c093237c4a708b76020) Conflicts: src/mgr/PyModuleRegistry.cc - maintain dout level --- diff --git a/src/mgr/MgrStandby.cc b/src/mgr/MgrStandby.cc index ee246b8cbf6e..baf7cac48919 100644 --- a/src/mgr/MgrStandby.cc +++ b/src/mgr/MgrStandby.cc @@ -133,7 +133,10 @@ int MgrStandby::init() // We must register our config callback before calling init(), so // that we see the initial configuration message monc.register_config_callback([this](const std::string &k, const std::string &v){ - dout(10) << "config_callback: " << k << " : " << v << dendl; + // removing value to hide sensitive data going into mgr logs + // leaving this for debugging purposes + // dout(10) << "config_callback: " << k << " : " << v << dendl; + dout(10) << "config_callback: " << k << " : " << dendl; if (k.substr(0, 4) == "mgr/") { const std::string global_key = PyModule::config_prefix + k.substr(4); py_module_registry.handle_config(global_key, v); diff --git a/src/mgr/PyModuleRegistry.cc b/src/mgr/PyModuleRegistry.cc index da4a5a304400..e391ad6386ad 100644 --- a/src/mgr/PyModuleRegistry.cc +++ b/src/mgr/PyModuleRegistry.cc @@ -427,7 +427,10 @@ void PyModuleRegistry::handle_config(const std::string &k, const std::string &v) std::lock_guard l(module_config.lock); if (!v.empty()) { - dout(4) << "Loaded module_config entry " << k << ":" << v << dendl; + // removing value to hide sensitive data going into mgr logs + // leaving this for debugging purposes + // dout(10) << "Loaded module_config entry " << k << ":" << v << dendl; + dout(4) << "Loaded module_config entry " << k << ":" << dendl; module_config.config[k] = v; } else { module_config.config.erase(k);