Project

General

Profile

Feature #21502

Enable mgr modules to report their "runnability"

Added by John Spray almost 2 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
ceph-mgr
Target version:
-
Start date:
09/22/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

If a module has a dependency which is missing, we should be able to learn that on a mgr (even in standby), so that it can include that in its beacon to mons, and the mons can say "no, you can't enable that module" if we already know the module can't work.

So maybe modules get a "is_loadable" method that does a try/except import of dependencies, and reports back.

This would depend on the change to load modules on standbys (https://github.com/ceph/ceph/pull/16651)

History

#1 Updated by Wido den Hollander almost 2 years ago

This them implies that no import of any "foreign module" may be done in the header of a Mgr Module but should always be done the init() method and attempted in the is_loadable() method.

#2 Updated by John Spray almost 2 years ago

Right, although now that I think about it, we could probably also catch ImportErrors from when we try to load the module from the C++ side (although in general I prefer modules don't do that, so that they can run selftest methods even without dependencies).

#3 Updated by John Spray almost 2 years ago

  • Status changed from New to In Progress
  • Assignee set to John Spray

#4 Updated by John Spray almost 2 years ago

  • Status changed from In Progress to Need Review

#5 Updated by John Spray over 1 year ago

  • Status changed from Need Review to Resolved

Also available in: Atom PDF