From 17f8f078fc8cb601db8f200978b93ba5dff7df84 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Thu, 17 Jan 2019 08:59:29 -0500 Subject: [PATCH] mgr/rook: populate ServiceDescription.service for mds and nfs services Signed-off-by: Jeff Layton --- src/pybind/mgr/rook/module.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/rook/module.py b/src/pybind/mgr/rook/module.py index cb9d2b053d2d..090c37c822dd 100644 --- a/src/pybind/mgr/rook/module.py +++ b/src/pybind/mgr/rook/module.py @@ -348,14 +348,17 @@ class RookOrchestrator(MgrModule, orchestrator.Orchestrator): if sd.service_type == "osd": sd.service_instance = "%s" % p['labels']["ceph-osd-id"] elif sd.service_type == "mds": - sd.service_instance = p['labels']["rook_file_system"] + sd.service = p['labels']['rook_file_system'] + pfx = "{0}-".format(sd.service) + sd.service_instance = p['labels']['ceph_daemon_id'].replace(pfx, '', 1) elif sd.service_type == "mon": sd.service_instance = p['labels']["mon"] elif sd.service_type == "mgr": sd.service_instance = p['labels']["mgr"] elif sd.service_type == "nfs": - sd.service_instance = p['labels']["ceph_nfs"] - sd.rados_config_location = self.rook_cluster.get_nfs_conf_url(sd.service_instance, p['labels']['instance']) + sd.service = p['labels']['ceph_nfs'] + sd.service_instance = p['labels']['instance'] + sd.rados_config_location = self.rook_cluster.get_nfs_conf_url(sd.service, sd.service_instance) else: # Unknown type -- skip it continue -- 2.47.3