New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mgr/dashboard: add Feature Toggles #26102
Conversation
4cda79a
to
d7c9bc9
Compare
28cc8af
to
db19bcc
Compare
212d5d9
to
b810521
Compare
A new helper class `Options` has been added to ease adding new MODULE_OPTIONS. Fixes: http://tracker.ceph.com/issues/37530 Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Provide plugin infrastructure and a minimal set of hooks. As python-pluggy library is not yet available for all the distros that Ceph is targeted at, a minimal implementation has been provided. Fixes: http://tracker.ceph.com/issues/37530 Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Add feature-toggles plugin. It allows to enable, disable and check status of a feature. Features are disabled by making their corresponding enpoints return HTTP 501 error (Not Implemented). Fixes: http://tracker.ceph.com/issues/37530 Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Provide a hook for creating REST controllers and endpoints. Provide also a REST controller for Feature Toggles plugin. Fixes: http://tracker.ceph.com/issues/37530 Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Add front-end behaviours to feature toggles: - In navigation pane, drop-down menu items are displayed/hidden accordingly. - In main dashboard page, info cards are displayed/hidded. - Routes are also enabled/disabled. When disabled, they redirect to 404. Fixes: http://tracker.ceph.com/issues/37530 Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
ef71af1
to
5be299e
Compare
Teuthology run: 3/4 passed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jenkins render docs please
5be299e
to
c7d66ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works
Add python unit test for feature toggles plugin, and refactor other files, and add a new type of function cache decorator based on LRU but with a TTL. Fixes: http://tracker.ceph.com/issues/37530 Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Fixes: http://tracker.ceph.com/issues/37530 Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Fix front-end formatting as suggested by tspmelo Fixes: http://tracker.ceph.com/issues/37530 Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Fixes: http://tracker.ceph.com/issues/37530 Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Fixes: http://tracker.ceph.com/issues/37530 Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Add '*.inc.rst' to the list of excluded patterns from sphinx-build. This allows for using '*.inc.rst' as includes, and avoids duplicates. The benefit of keeping the trailing '.rst' extension is that most IDEs use that to render reStructured Text files. Fixes: http://tracker.ceph.com/issues/37530 Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
c7d66ba
to
ae8e288
Compare
Teuthology run: 100% Passed [4/4] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - I tested it locally
This PR brings to Ceph Dashboard back-end support for Feature Toggles (aka Feature Flags, Switches, etc.), which will allow an Admin to disable specific features (e.g.: RBD iSCSI, CephFS, etc). Features may be enabled/disabled live, with no need of reloading Ceph Dashboard.
An alternative implementation has been proposed in #25665
For implementing this feature a new Plugin based architecture has been introduced into Ceph-Dashboard back-end.
Command-line usage:
This PR also bring minor fixes related to module options.
Fixes: http://tracker.ceph.com/issues/37530
Signed-off-by: Ernesto Puerta epuertat@redhat.com