]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: don't add config values to mgr log in config_callback and module_config
authorNeha Ojha <nojha@redhat.com>
Thu, 3 Dec 2020 20:34:53 +0000 (20:34 +0000)
committerNeha Ojha <nojha@redhat.com>
Tue, 15 Dec 2020 16:02:15 +0000 (16:02 +0000)
The original code has been commented out and left for future debugging
purposes.

Signed-off-by: Neha Ojha <nojha@redhat.com>
src/mgr/MgrStandby.cc
src/mgr/PyModuleRegistry.cc

index 22e419a9eb2dd1fe67025a6baa0f518fa270f312..dd31814845510b4834ed7d974d5fc65c5bf30dbd 100644 (file)
@@ -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);
index ad461aa47bc85bbbba92b7e9d9e600ebdd1e278a..221b93beed7b48dfb9e1a6ad864b20229da51160 100644 (file)
@@ -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);