From: Sebastian Wagner Date: Mon, 22 Jul 2019 12:36:41 +0000 (+0200) Subject: mgr: cleanup idle debug log at level 4. X-Git-Tag: v15.1.0~2114^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F29164%2Fhead;p=ceph.git mgr: cleanup idle debug log at level 4. 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 --- diff --git a/src/mgr/ActivePyModules.cc b/src/mgr/ActivePyModules.cc index 57ab93a74c63..a6d3fce2238f 100644 --- a/src/mgr/ActivePyModules.cc +++ b/src/mgr/ActivePyModules.cc @@ -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; } diff --git a/src/mgr/DaemonServer.cc b/src/mgr/DaemonServer.cc index 1f075795c581..806f023d1988 100644 --- a/src/mgr/DaemonServer.cc +++ b/src/mgr/DaemonServer.cc @@ -393,7 +393,7 @@ bool DaemonServer::handle_open(const ref_t& 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& 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; diff --git a/src/mgr/Mgr.cc b/src/mgr/Mgr.cc index 5726dcda4243..0ee9dff40648 100644 --- a/src/mgr/Mgr.cc +++ b/src/mgr/Mgr.cc @@ -520,7 +520,7 @@ void Mgr::handle_mon_map() bool Mgr::ms_dispatch2(const ref_t& m) { - dout(4) << *m << dendl; + dout(10) << *m << dendl; std::lock_guard l(lock); switch (m->get_type()) { diff --git a/src/mgr/MgrStandby.cc b/src/mgr/MgrStandby.cc index 13d03a69efd7..a40d02b17121 100644 --- a/src/mgr/MgrStandby.cc +++ b/src/mgr/MgrStandby.cc @@ -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 modules = py_module_registry.get_modules(); @@ -432,7 +432,7 @@ void MgrStandby::handle_mgr_map(ref_t mmap) bool MgrStandby::ms_dispatch2(const ref_t& 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(m)); diff --git a/src/mgr/PyModuleRegistry.cc b/src/mgr/PyModuleRegistry.cc index 061a92c6c7cc..16c43e40e070 100644 --- a/src/mgr/PyModuleRegistry.cc +++ b/src/mgr/PyModuleRegistry.cc @@ -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); diff --git a/src/pybind/mgr/rook/module.py b/src/pybind/mgr/rook/module.py index 4b49d68100e9..37d7bbb8d02b 100644 --- a/src/pybind/mgr/rook/module.py +++ b/src/pybind/mgr/rook/module.py @@ -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