Merge pull request #29042 from sebastian-philipp/orchestrator-doc-disable

mgr/orchestrator: Fix disabling the orchestrator

Reviewed-by: Tim Serong <tserong@suse.com>
This commit is contained in:
Sebastian Wagner 2019-07-23 09:03:48 +02:00 committed by GitHub
commit d0855cf5e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 7 deletions

View File

@ -49,7 +49,8 @@ The relation between the names is the following:
Configuration
=============
You can select the orchestrator module to use with the ``set backend`` command::
To enable the orchestrator, please select the orchestrator module to use
with the ``set backend`` command::
ceph orchestrator set backend <module>
@ -62,6 +63,14 @@ You can then check backend is properly configured::
ceph orchestrator status
Disable the Orchestrator
~~~~~~~~~~~~~~~~~~~~~~~~
To disable the orchestrator again, use the empty string ``""``::
ceph orchestrator set backend ""``
ceph mgr module disable rook
Usage
=====
@ -223,11 +232,11 @@ services of a particular type via optional --type parameter
::
ceph orchestrator service ls [--host host] [--svc_type type] [--refresh|--no-cache]
ceph orchestrator service ls [--host host] [--svc_type type] [--refresh]
Discover the status of a particular service::
ceph orchestrator service status <type> <name> [--refresh]
ceph orchestrator service ls --svc_type type --svc_id <name> [--refresh]
Query the status of a particular service instance (mon, osd, mds, rgw). For OSDs
@ -280,13 +289,12 @@ This is an overview of the current implementation status of the orchestrators.
host rm ✔️ ⚪ ⚪ ✔️
mgr update ⚪ ⚪ ⚪ ✔️
mon update ⚪ ✔️ ⚪ ✔️
osd create ✔️ ✔️ ⚪ ✔️
osd create ✔️ ✔️ ⚪ ✔️
osd device {ident,fault}-{on,off} ⚪ ⚪ ⚪ ⚪
osd rm ✔️ ⚪ ⚪ ⚪
device {ident,fault}-(on,off} ⚪ ⚪ ⚪ ⚪
device ls ✔️ ✔️ ✔️ ✔️
service ls ⚪ ✔️ ✔️ ⚪
service status ⚪ ✔️ ✔️ ⚪
service-instance status ⚪ ⚪ ⚪ ⚪
iscsi {stop,start,reload} ⚪ ⚪ ⚪ ⚪
iscsi add ⚪ ⚪ ⚪ ⚪

View File

@ -78,6 +78,10 @@ class TestModuleSelftest(MgrTestCase):
def test_crash(self):
self._selftest_plugin("crash")
def test_orchestrator_cli(self):
self._selftest_plugin("orchestrator_cli")
def test_selftest_config_update(self):
"""
That configuration updates are seen by running mgr modules

View File

@ -1017,7 +1017,8 @@ class MgrModule(ceph_module.BaseMgrModule):
return self._get_module_option(key, default, self.get_mgr_id())
def _set_module_option(self, key, val):
return self._ceph_set_module_option(self.module_name, key, str(val))
return self._ceph_set_module_option(self.module_name, key,
None if val is None else str(val))
def set_module_option(self, key, val):
"""

View File

@ -399,7 +399,7 @@ Usage:
"""
mgr_map = self.get("mgr_map")
if module_name == "":
if module_name is None or module_name == "":
self.set_module_option("orchestrator", None)
return HandleCommandResult()
@ -449,3 +449,9 @@ Usage:
o, avail,
" ({0})".format(why) if not avail else ""
))
def self_test(self):
old_orch = self._select_orchestrator()
self._set_backend('')
assert self._select_orchestrator() is None
self._set_backend(old_orch)