From: Sage Weil Date: Thu, 14 Feb 2019 13:24:09 +0000 (-0600) Subject: mgr/ActivePyModules: do not touch PyFormatter without the GIL X-Git-Tag: v12.2.13~169^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ed55f3a0a716502635df8dbdc7a175f5760d9332;p=ceph.git mgr/ActivePyModules: do not touch PyFormatter without the GIL Signed-off-by: Sage Weil (cherry picked from commit 9ad2283db555a38b4951e42001ba884ba2dd86bf) Conflicts: there is no "devices" API until Nautilus. --- diff --git a/src/mgr/ActivePyModules.cc b/src/mgr/ActivePyModules.cc index 7cb660ab0af..f577d48f202 100644 --- a/src/mgr/ActivePyModules.cc +++ b/src/mgr/ActivePyModules.cc @@ -98,10 +98,10 @@ PyObject *ActivePyModules::get_server_python(const std::string &hostname) PyObject *ActivePyModules::list_servers_python() { + PyFormatter f(false, true); PyThreadState *tstate = PyEval_SaveThread(); dout(10) << " >" << dendl; - PyFormatter f(false, true); daemon_state.with_daemons_by_server([this, &f, &tstate] (const std::map &all) { PyEval_RestoreThread(tstate);