From: Sage Weil Date: Thu, 12 Mar 2020 19:27:59 +0000 (-0400) Subject: mgr/rook: use ceph_daemon_id label consistently X-Git-Tag: v15.1.1~8^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=903c957efe76b91d4e465f5257589eba0ae5f726;p=ceph.git mgr/rook: use ceph_daemon_id label consistently In particular, for mds's, it's $fsname-$rank for mds.$fsname-$rank, which is what we want. Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/rook/module.py b/src/pybind/mgr/rook/module.py index 32af1bba2dac..ecd27701cc20 100644 --- a/src/pybind/mgr/rook/module.py +++ b/src/pybind/mgr/rook/module.py @@ -353,18 +353,7 @@ class RookOrchestrator(MgrModule, orchestrator.Orchestrator): sd.status = status sd.status_desc = p['phase'] - if sd.daemon_type == "osd": - sd.daemon_id = "%s" % p['labels']["ceph-osd-id"] - elif sd.daemon_type == "mds": - pfx = "{0}-".format(p['labels']['rook_file_system']) - sd.daemon_id = p['labels']['ceph_daemon_id'].replace(pfx, '', 1) - elif sd.daemon_type == "mon": - sd.daemon_id = p['labels']["mon"] - elif sd.daemon_type == "mgr": - sd.daemon_id = p['labels']["mgr"] - elif sd.daemon_type == "nfs": - sd.daemon_id = p['labels']['instance'] - elif sd.daemon_type == "rgw": + if 'ceph_daemon_id' in p['labels']: sd.daemon_id = p['labels']['ceph_daemon_id'] else: # Unknown type -- skip it