]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr: do not load disabled modules
authorKefu Chai <kchai@redhat.com>
Thu, 30 Apr 2020 03:34:07 +0000 (11:34 +0800)
committerCory Snyder <csnyder@iland.com>
Tue, 1 Jun 2021 11:38:48 +0000 (07:38 -0400)
commitfc9a70cb908c335fb93c82b031c3d0bce4e36477
treea74296b22325b11ffe376be36a31d35d1682b83c
parent1c25484db43268b56be8e57f5627bfc752d02f47
mgr: do not load disabled modules

an option named "mgr_disabled_modules" is added in this change to
prevent mgr from loading modules listed in this option. because mgr
loads *all* modules found in the configured path, and per
https://tracker.ceph.com/issues/45147, python subinterpreter could hang
when loading numpy, so this behavior practically creates a deadlock
in mgr.

this issue is found when mgr uses python3.8 runtime. in development
environment, it'd be inconvenient to disable the offending mgr module
without changing the source code, even if we can choose to not install
them, for instance, the enduser can workaround this issue by
uninstalling `ceph-mgr-diskprediction-local`.

an option would be useful in this case, so we can add the module to the
list before mgr tries to load it.

as this issue is found with python3.8 + diskprediction_local (numpy), so
this mgr module is disabled by default if mgr is compiled with python3.8
runtime.

Fixes: https://tracker.ceph.com/issues/45147
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 067adbf9a032b5de793fd0b41b071f24f075270a)
CMakeLists.txt
src/common/options.cc
src/include/config-h.in.cmake
src/mgr/PyModuleRegistry.cc