From: John Spray Date: Tue, 15 May 2018 22:13:51 +0000 (+0100) Subject: mgr: improve logging on handle_command path X-Git-Tag: v14.0.1~916^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=af8c2ce4ea2ad03b44ca1566a6095aee9adbd22b;p=ceph-ci.git mgr: improve logging on handle_command path Signed-off-by: John Spray --- diff --git a/src/mgr/ActivePyModule.cc b/src/mgr/ActivePyModule.cc index 42ad021d02d..c89334e08a3 100644 --- a/src/mgr/ActivePyModule.cc +++ b/src/mgr/ActivePyModule.cc @@ -135,6 +135,8 @@ int ActivePyModule::handle_command( int r = 0; if (pResult != NULL) { if (PyTuple_Size(pResult) != 3) { + derr << "module '" << py_module->get_name() << "' command handler " + "returned wrong type!" << dendl; r = -EINVAL; } else { r = PyInt_AsLong(PyTuple_GetItem(pResult, 0)); @@ -144,6 +146,8 @@ int ActivePyModule::handle_command( Py_DECREF(pResult); } else { + derr << "module '" << py_module->get_name() << "' command handler " + "threw exception: " << peek_pyerror() << dendl; *ds << ""; *ss << handle_pyerror(); r = -EINVAL;