]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/rook: adapt to arg passing change in orchestrator_cli.py
authorJoshua Schmid <jschmid@suse.de>
Wed, 4 Dec 2019 12:45:42 +0000 (13:45 +0100)
committerJoshua Schmid <jschmid@suse.de>
Thu, 12 Dec 2019 09:06:03 +0000 (10:06 +0100)
Signed-off-by: Joshua Schmid <jschmid@suse.de>
src/pybind/mgr/orchestrator_cli/module.py
src/pybind/mgr/rook/module.py

index 16974fdc9786ce94f7ee0595b84d6172b1bc48f4..0293c5181dac671808c2800d98a31d0fd39b3b5e 100644 (file)
@@ -434,10 +434,10 @@ Usage:
         'orchestrator mds update',
         "name=fs_name,type=CephString "
         "name=num,type=CephInt,req=false "
-        "name=hosts,type=CephString,n=N,req=false "
         "name=label,type=CephString,req=false",
+        "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=None, hosts=[], label=None):
+    def _mds_update(self, fs_name, num=None, label=None, hosts=[]):
         placement = orchestrator.PlacementSpec(label=label, count=num, nodes=hosts)
         placement.validate()
 
index 6ed4a0e917db9300845cde07866d8d4ceea18de1..a04f7732c5063527429c74026c71db009961d92f 100644 (file)
@@ -337,13 +337,13 @@ class RookOrchestrator(MgrModule, orchestrator.Orchestrator):
             'NFS', name, lambda: self.rook_cluster.rm_service('cephnfses', name)
         )
 
-    def update_mons(self, num, hosts):
-        if hosts:
+    def update_mons(self, spec):
+        if spec.placement.nodes:
             raise RuntimeError("Host list is not supported by rook.")
 
         return write_completion(
-            lambda: self.rook_cluster.update_mon_count(num),
-            "Updating mon count to {0}".format(num),
+            lambda: self.rook_cluster.update_mon_count(spec.placement.count),
+            "Updating mon count to {0}".format(spec.placement.count),
             mgr=self
         )