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: v16.1.0~251^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=19000fad573138b2b0576c093237c4a708b76020;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 --- diff --git a/src/mgr/MgrStandby.cc b/src/mgr/MgrStandby.cc index 22e419a9eb2d..dd3181484551 100644 --- a/src/mgr/MgrStandby.cc +++ b/src/mgr/MgrStandby.cc @@ -132,7 +132,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 ad461aa47bc8..221b93beed7b 100644 --- a/src/mgr/PyModuleRegistry.cc +++ b/src/mgr/PyModuleRegistry.cc @@ -431,7 +431,10 @@ void PyModuleRegistry::handle_config(const std::string &k, const std::string &v) std::lock_guard l(module_config.lock); if (!v.empty()) { - dout(10) << "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(10) << "Loaded module_config entry " << k << ":" << dendl; module_config.config[k] = v; } else { module_config.config.erase(k);