]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
orchestrator/rook: allow describe_service to report mgr containers
authorJeff Layton <jlayton@redhat.com>
Wed, 31 Oct 2018 11:40:29 +0000 (07:40 -0400)
committerJeff Layton <jlayton@redhat.com>
Wed, 31 Oct 2018 17:37:34 +0000 (13:37 -0400)
This label seems to be present in the rook version I've been working
with, so let's wire it in.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
doc/mgr/orchestrator_cli.rst
src/pybind/mgr/rook/module.py
src/pybind/mgr/rook/rook_cluster.py

index 67ff07269916371088183f307e99b9a4eb7a0858..cbd2b317525dd72d30f028dcacdef2e81e675c0b 100644 (file)
@@ -43,7 +43,7 @@ filtered to a particular node:
 
     orchestrator device ls [node]
 
-Query the status of a particular service (mon, osd, mds, rgw).  For OSDs
+Query the status of a particular service (mon, osd, mgr, mds, rgw).  For OSDs
 the id is the numeric OSD ID, for MDS services it is the filesystem name:
 
 ::
index bbc0ceebb7a3be2546d2d5e88fd2078504043de6..1853606a75224de4f1ca5618d0017129fd467443 100644 (file)
@@ -334,7 +334,7 @@ class RookOrchestrator(MgrModule, orchestrator.Orchestrator):
     @deferred_read
     def describe_service(self, service_type, service_id):
 
-        assert service_type in ("mds", "osd", "mon", "rgw"), service_type + " unsupported"
+        assert service_type in ("mds", "osd", "mgr", "mon", "rgw"), service_type + " unsupported"
 
         pods = self.rook_cluster.describe_pods(service_type, service_id)
 
@@ -354,9 +354,7 @@ class RookOrchestrator(MgrModule, orchestrator.Orchestrator):
             elif service_type == "mon":
                 sl.daemon_name = p['labels']["mon"]
             elif service_type == "mgr":
-                # FIXME: put a label on the pod to consume
-                # from here
-                raise NotImplementedError("mgr")
+                sl.daemon_name = p['labels']["mgr"]
             elif service_type == "rgw":
                 # FIXME: put a label on the pod to consume
                 # from here
index e3303408e604dfd0668498de98f867b74d4f05b8..ff2b90ceb1847af51ce8811df93f92438b3cbcf5 100644 (file)
@@ -154,8 +154,7 @@ class RookCluster(object):
             # label like mon=rook-ceph-mon0
             label_filter += ",mon={0}".format(service_id)
         elif service_type == "mgr":
-            # TODO: get Rook to label mgr pods
-            pass
+            label_filter += ",mgr={0}".format(service_id)
         elif service_type == "rgw":
             # TODO: rgw
             pass