]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/orchestrator_cli: add 'mds update' command
authorSage Weil <sage@redhat.com>
Mon, 28 Oct 2019 19:12:07 +0000 (14:12 -0500)
committerSage Weil <sage@redhat.com>
Mon, 28 Oct 2019 19:15:27 +0000 (14:15 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/orchestrator_cli/module.py

index 9dec5d7c4c6a801d5204ee7a4cda1a1392458d2b..b051d2f1490b98455066a7eeddf8c2069c3feb6e 100644 (file)
@@ -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 <rgw_spec> can be provided'\