From: Sage Weil Date: Mon, 28 Oct 2019 19:12:07 +0000 (-0500) Subject: mgr/orchestrator_cli: add 'mds update' command X-Git-Tag: v15.1.0~1123^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8f54c12ee840bfc9919f9be315e2cc6429be1ec9;p=ceph.git mgr/orchestrator_cli: add 'mds update' command Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/orchestrator_cli/module.py b/src/pybind/mgr/orchestrator_cli/module.py index 9dec5d7c4c6a..b051d2f1490b 100644 --- a/src/pybind/mgr/orchestrator_cli/module.py +++ b/src/pybind/mgr/orchestrator_cli/module.py @@ -251,6 +251,21 @@ Usage: orchestrator.raise_if_exception(completion) return HandleCommandResult(stdout=completion.result_str()) + @_write_cli('orchestrator mds update', + "name=fs_name,type=CephString " + "name=num,type=CephInt,req=true " + "name=hosts,type=CephString,n=N,req=false", + 'Update the number of MDS instances for the given fs_name') + def _mds_update(self, fs_name, num, hosts=None): + spec = orchestrator.StatelessServiceSpec( + fs_name, + placement=orchestrator.PlacementSpec(nodes=hosts), + count=num or 1) + completion = self.update_mds(spec) + self._orchestrator_wait([completion]) + orchestrator.raise_if_exception(completion) + return HandleCommandResult(stdout=completion.result_str()) + @_write_cli('orchestrator rgw add', 'name=zone_name,type=CephString,req=false', 'Create an RGW service. A complete can be provided'\