Skip to content

mgr: do not load disabled modules#34846

Merged
tchaikov merged 2 commits intoceph:masterfrom
tchaikov:wip-45147
May 1, 2020
Merged

mgr: do not load disabled modules#34846
tchaikov merged 2 commits intoceph:masterfrom
tchaikov:wip-45147

Conversation

@tchaikov
Copy link
Contributor

Fixes: https://tracker.ceph.com/issues/45147

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@tchaikov tchaikov force-pushed the wip-45147 branch 2 times, most recently from 64d4dbb to 26a9509 Compare April 30, 2020 09:26
@tchaikov
Copy link
Contributor Author

for better readability

Signed-off-by: Kefu Chai <kchai@redhat.com>
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>
Copy link
Contributor

@jtlayton jtlayton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this and it seemed to fix the problem with the mgr never starting up on Fedora 32.

Copy link
Member

@jdurgin jdurgin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good for now, we should have a bug open for the long term fix (whatever it ends up being) to get the disk prediction module working with 3.8 and later

@sebastian-philipp
Copy link
Contributor

Hm, what about mon commands that are exposed by disabled modules? are they still registered?

@tchaikov
Copy link
Contributor Author

Hm, what about mon commands that are exposed by disabled modules? are they still registered?

no, they are not anymore. as they are practically invisible from mgr if they are blacklisted.

@sebastian-philipp
Copy link
Contributor

what about importing python dependencies in diskprediction_cloud only, if the module is active?

@tchaikov
Copy link
Contributor Author

what about importing python dependencies in diskprediction_cloud only, if the module is active?

i am not sure what you mean, only "diskprediction-local" is disabled if python3.8 is used, as this module imports numpy indirectly. how is this related to diskprediction_cloud?

@tchaikov
Copy link
Contributor Author

seems good for now, we should have a bug open for the long term fix (whatever it ends up being) to get the disk prediction module working with 3.8 and later

@jdurgin how about keeping https://tracker.ceph.com/issues/45147 open after this changeset is merged?

@jdurgin
Copy link
Member

jdurgin commented Apr 30, 2020

seems good for now, we should have a bug open for the long term fix (whatever it ends up being) to get the disk prediction module working with 3.8 and later

@jdurgin how about keeping https://tracker.ceph.com/issues/45147 open after this changeset is merged?

Sounds good to me

@tchaikov tchaikov merged commit f701ed8 into ceph:master May 1, 2020
@tchaikov tchaikov deleted the wip-45147 branch May 1, 2020 05:08
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Apr 6, 2021
update to upstream release 15.2.10
fixes FS#70062

backport upstream workaround for incompatible mgr modules, references:
https://tracker.ceph.com/issues/45147
ceph/ceph#34846
fixes FS#68726

git-svn-id: file:///srv/repos/svn-community/svn@912123 9fca08f4-af9d-4005-b8df-a31f2cc04f65
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this pull request Apr 6, 2021
update to upstream release 15.2.10
fixes FS#70062

backport upstream workaround for incompatible mgr modules, references:
https://tracker.ceph.com/issues/45147
ceph/ceph#34846
fixes FS#68726


git-svn-id: file:///srv/repos/svn-community/svn@912123 9fca08f4-af9d-4005-b8df-a31f2cc04f65
bazaah pushed a commit to bazaah/aur-ceph that referenced this pull request Oct 16, 2022
update to upstream release 15.2.10
fixes FS#70062

backport upstream workaround for incompatible mgr modules, references:
https://tracker.ceph.com/issues/45147
ceph/ceph#34846
fixes FS#68726

git-svn-id: file:///srv/repos/svn-community/svn@912123 9fca08f4-af9d-4005-b8df-a31f2cc04f65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants