Actions
Cleanup #38717
openmgr: remove duplicate Active-Standby code in C++ mgr and Python mgr_module.py
Status:
New
Priority:
Normal
Assignee:
-
Category:
ceph-mgr
Target version:
-
% Done:
0%
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:
Description
Currently both Ceph-mgr and mgr_module.py have a notable amount of duplicate code for implementing the API both in Active and Stand-by instances. The overhead of keeping 2 implementations aligned has already led to some oversights (e.g.: {get,set}_module_option()
interface is different in both Active and Standby modules, and both at C++ and Python sides).
- In Python:
OptionMixin
base class providing{get,set}_module_option
implementations, where high level option handling is performed, and falling back then to their corresponding C++ calls. - In C++: a similar approach is possible.
If more methods can be moved out of the Active-Standby specific logic, a CommonBaseMgr could be used instead.
This should also help keep Ceph-mgr API docs updated (currently they do not reflect the latest Ceph-mgr module API).
Actions