]> 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>
Wed, 16 Dec 2020 00:24:45 +0000 (00:24 +0000)
The original code has been commented out and left for future debugging
purposes.

Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit 19000fad573138b2b0576c093237c4a708b76020)

 Conflicts:
src/mgr/PyModuleRegistry.cc - maintain dout level

src/mgr/MgrStandby.cc
src/mgr/PyModuleRegistry.cc

index ee246b8cbf6ea9e4f0d125ac3e45449e12225ffd..baf7cac48919ec1ff5cd8d2cfe75f8e947d9f77f 100644 (file)
@@ -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);
index da4a5a3044001db0169e0ebb1fdfe2afdd36290e..e391ad6386adb6249fa2fada092231f0a3597818 100644 (file)
@@ -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);