]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr: cleanup idle debug log at level 4.
authorSebastian Wagner <sebastian.wagner@suse.com>
Mon, 22 Jul 2019 12:36:41 +0000 (14:36 +0200)
committerSebastian Wagner <sebastian.wagner@suse.com>
Mon, 22 Jul 2019 12:36:41 +0000 (14:36 +0200)
Changed all messages to 10 that are printed repeatedly in an idle cluster.

This makes debugging Python modules easier as the log
is no longer pullued by mgr core messages.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
src/mgr/ActivePyModules.cc
src/mgr/DaemonServer.cc
src/mgr/Mgr.cc
src/mgr/MgrStandby.cc
src/mgr/PyModuleRegistry.cc
src/pybind/mgr/rook/module.py

index 57ab93a74c6344ec9c6098e3db2108eec4bf9a38..a6d3fce2238fc190ad09215c1e058becbd240d40 100644 (file)
@@ -516,7 +516,7 @@ bool ActivePyModules::get_config(const std::string &module_name,
   const std::string global_key = PyModule::config_prefix
     + module_name + "/" + key;
 
-  dout(4) << __func__ << " key: " << global_key << dendl;
+  dout(20) << " key: " << global_key << dendl;
 
   std::lock_guard lock(module_config.lock);
   
@@ -558,10 +558,10 @@ PyObject *ActivePyModules::get_typed_config(
   }
   PyEval_RestoreThread(tstate);
   if (prefix.size()) {
-    dout(4) << __func__ << " [" << prefix << "/]" << key << " not found "
+    dout(10) << " [" << prefix << "/]" << key << " not found "
            << dendl;
   } else {
-    dout(4) << __func__ << " " << key << " not found " << dendl;
+    dout(10) << " " << key << " not found " << dendl;
   }
   Py_RETURN_NONE;
 }
index 1f075795c581e29a2da62214dfdb664614cc880d..806f023d1988a4a47aa0e0c9bea00e966580e47b 100644 (file)
@@ -393,7 +393,7 @@ bool DaemonServer::handle_open(const ref_t<MMgrOpen>& m)
                                   m->get_connection()->get_peer_type(),
                                   m->daemon_name);
 
-  dout(4) << "from " << m->get_connection() << "  " << key << dendl;
+  dout(10) << "from " << m->get_connection() << "  " << key << dendl;
 
   _send_configure(m->get_connection());
 
@@ -495,13 +495,13 @@ bool DaemonServer::handle_report(const ref_t<MMgrReport>& m)
   }
   key.second = m->daemon_name;
 
-  dout(4) << "from " << m->get_connection() << " " << key << dendl;
+  dout(10) << "from " << m->get_connection() << " " << key << dendl;
 
   if (m->get_connection()->get_peer_type() == entity_name_t::TYPE_CLIENT &&
       m->service_name.empty()) {
     // Clients should not be sending us stats unless they are declaring
     // themselves to be a daemon for some service.
-    dout(4) << "rejecting report from non-daemon client " << m->daemon_name
+    dout(10) << "rejecting report from non-daemon client " << m->daemon_name
            << dendl;
     m->get_connection()->mark_down();
     return true;
index 5726dcda4243f2446bccc369b696265a94776d90..0ee9dff40648d09910915286a05f53c12bd49722 100644 (file)
@@ -520,7 +520,7 @@ void Mgr::handle_mon_map()
 
 bool Mgr::ms_dispatch2(const ref_t<Message>& m)
 {
-  dout(4) << *m << dendl;
+  dout(10) << *m << dendl;
   std::lock_guard l(lock);
 
   switch (m->get_type()) {
index 13d03a69efd7d8dff1525baf9af4bc34ce72ce72..a40d02b171210c6a31404b0bfe8b7e8ef426e34c 100644 (file)
@@ -191,7 +191,7 @@ int MgrStandby::init()
 void MgrStandby::send_beacon()
 {
   ceph_assert(lock.is_locked_by_me());
-  dout(4) << state_str() << dendl;
+  dout(20) << state_str() << dendl;
 
   std::list<PyModuleRef> modules = py_module_registry.get_modules();
 
@@ -432,7 +432,7 @@ void MgrStandby::handle_mgr_map(ref_t<MMgrMap> mmap)
 bool MgrStandby::ms_dispatch2(const ref_t<Message>& m)
 {
   std::lock_guard l(lock);
-  dout(4) << state_str() << " " << *m << dendl;
+  dout(10) << state_str() << " " << *m << dendl;
 
   if (m->get_type() == MSG_MGR_MAP) {
     handle_mgr_map(ref_cast<MMgrMap>(m));
index 061a92c6c7cc9c1843595bad3804aa86305637a8..16c43e40e0702e5f33fe87e8dba749712480dbc3 100644 (file)
@@ -417,7 +417,7 @@ 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;
+    dout(10) << "Loaded module_config entry " << k << ":" << v << dendl;
     module_config.config[k] = v;
   } else {
     module_config.config.erase(k);
index 4b49d68100e96906c0b7fe1565b0c2591566f8a8..37d7bbb8d02b51b85d89a1ea3666236915e7975e 100644 (file)
@@ -162,7 +162,8 @@ class RookOrchestrator(MgrModule, orchestrator.Orchestrator):
     ]
 
     def wait(self, completions):
-        self.log.info("wait: completions={0}".format(completions))
+        if completions:
+            self.log.info("wait: completions={0}".format(completions))
 
         incomplete = False