]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr: do not load disabled modules 34846/head
authorKefu Chai <kchai@redhat.com>
Thu, 30 Apr 2020 03:34:07 +0000 (11:34 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 30 Apr 2020 11:11:22 +0000 (19:11 +0800)
commit067adbf9a032b5de793fd0b41b071f24f075270a
tree1ce4e2323b7aebe60adb64db4a5aad22ee2d574a
parent40d06ce623f19172721a2f1d5b4f4f8b642a3077
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>
CMakeLists.txt
src/common/options.cc
src/include/config-h.in.cmake
src/mgr/PyModuleRegistry.cc