]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/rook: use ceph_daemon_id label consistently
authorSage Weil <sage@redhat.com>
Thu, 12 Mar 2020 19:27:59 +0000 (15:27 -0400)
committerSage Weil <sage@redhat.com>
Thu, 12 Mar 2020 21:10:35 +0000 (17:10 -0400)
In particular, for mds's, it's $fsname-$rank for mds.$fsname-$rank,
which is what we want.

Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/rook/module.py

index 32af1bba2dace8490b2a5981f6ba3899398ea88f..ecd27701cc20ecf1213d0c41ac12c0b7c2e6d5c1 100644 (file)
@@ -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