From: Jeff Layton Date: Thu, 15 Nov 2018 18:19:22 +0000 (-0500) Subject: mgr/rook: allow service describe and service ls to display nfs services X-Git-Tag: v14.1.0~399^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F25633%2Fhead;p=ceph.git mgr/rook: allow service describe and service ls to display nfs services Extend the _service_ls routine and the rook backend so that it can properly display ceph NFS gateways as well. Signed-off-by: Jeff Layton --- diff --git a/src/pybind/mgr/rook/module.py b/src/pybind/mgr/rook/module.py index 9c8c862d24bd..ff4c55b350dc 100644 --- a/src/pybind/mgr/rook/module.py +++ b/src/pybind/mgr/rook/module.py @@ -334,7 +334,7 @@ class RookOrchestrator(MgrModule, orchestrator.Orchestrator): @deferred_read def describe_service(self, service_type, service_id, nodename): - assert service_type in ("mds", "osd", "mgr", "mon", None), service_type + " unsupported" + assert service_type in ("mds", "osd", "mgr", "mon", "nfs", None), service_type + " unsupported" pods = self.rook_cluster.describe_pods(service_type, service_id, nodename) @@ -353,6 +353,8 @@ class RookOrchestrator(MgrModule, orchestrator.Orchestrator): sd.daemon_name = p['labels']["mon"] elif sd.service_type == "mgr": sd.daemon_name = p['labels']["mgr"] + elif sd.service_type == "nfs": + sd.daemon_name = p['labels']["ceph_nfs"] else: # Unknown type -- skip it continue diff --git a/src/pybind/mgr/rook/rook_cluster.py b/src/pybind/mgr/rook/rook_cluster.py index 02288975bad4..1f84d3530cf9 100644 --- a/src/pybind/mgr/rook/rook_cluster.py +++ b/src/pybind/mgr/rook/rook_cluster.py @@ -161,6 +161,8 @@ class RookCluster(object): label_filter += ",mon={0}".format(service_id) elif service_type == "mgr": label_filter += ",mgr={0}".format(service_id) + elif service_type == "nfs": + label_filter += ",ceph_nfs={0}".format(service_id) elif service_type == "rgw": # TODO: rgw pass