]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/telemetry: add more pool metadata
authorSage Weil <sage@redhat.com>
Tue, 29 Oct 2019 18:05:30 +0000 (13:05 -0500)
committerSage Weil <sage@redhat.com>
Tue, 29 Oct 2019 19:24:59 +0000 (14:24 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
PendingReleaseNotes
src/pybind/mgr/telemetry/module.py

index 94c3dec74bac02522e2ec651226f2a2dc4d8b3df..2e0bd62e40b36a80f2dbd59d0c91c8b7672482a1 100644 (file)
     - which Ceph release the monitors are running
     - whether msgr v1 or v2 addresses are used for the monitors
     - whether IPv4 or IPv6 addresses are used for the monitors
+    - whether RADOS cache tiering is enabled (and which mode)
+    - whether pools are replicated or erasure coded, and
+      which erasure code profile plugin and parameters are in use
 
   If you had telemetry enabled, you will need to re-opt-in with::
 
index 2f0682d2492005dd9142705246835f6b3995ad4d..a2e79a98acf789a501065cd63f9d875d466c016d 100644 (file)
@@ -50,6 +50,7 @@ REVISION = 3
 #   - added device health metrics (i.e., SMART data, minus serial number)
 #   - added CephFS metadata (how many MDSs, fs features, how many data pools)
 #   - remove crush_rule
+#   - added more pool metadata (rep vs ec, cache tiering mode, ec profile)
 
 class Module(MgrModule):
     config = dict()
@@ -372,6 +373,7 @@ class Module(MgrModule):
 
             report['created'] = mon_map['created']
 
+            # mons
             v1_mons = 0
             v2_mons = 0
             ipv4_mons = 0
@@ -398,10 +400,20 @@ class Module(MgrModule):
 
             report['config'] = self.gather_configs()
 
+            # pools
             num_pg = 0
             report['pools'] = list()
             for pool in osd_map['pools']:
                 num_pg += pool['pg_num']
+                ec_profile = {}
+                if pool['erasure_code_profile']:
+                    orig = osd_map['erasure_code_profiles'].get(
+                        pool['erasure_code_profile'], {})
+                    ec_profile = {
+                        k: orig[k] for k in orig.keys()
+                        if k in ['k', 'm', 'plugin', 'technique',
+                                 'crush-failure-domain', 'l']
+                    }
                 report['pools'].append(
                     {
                         'pool': pool['pool'],
@@ -413,15 +425,20 @@ class Module(MgrModule):
                         'pg_autoscale_mode': pool['pg_autoscale_mode'],
                         'target_max_bytes': pool['target_max_bytes'],
                         'target_max_objects': pool['target_max_objects'],
+                        'type': ['', 'replicated', '', 'erasure'][pool['type']],
+                        'erasure_code_profile': ec_profile,
+                        'cache_mode': pool['cache_mode'],
                     }
                 )
 
+            # osds
             report['osd'] = {
                 'count': len(osd_map['osds']),
                 'require_osd_release': osd_map['require_osd_release'],
                 'require_min_compat_client': osd_map['require_min_compat_client']
             }
 
+            # cephfs
             report['fs'] = {
                 'count': len(fs_map['filesystems']),
                 'feature_flags': fs_map['feature_flags'],
@@ -449,6 +466,7 @@ class Module(MgrModule):
                 num_mds += len(fs['info'])
             report['fs']['total_num_mds'] = num_mds
 
+            # daemons
             report['metadata'] = dict()
             report['metadata']['osd'] = self.gather_osd_metadata(osd_map)
             report['metadata']['mon'] = self.gather_mon_metadata(mon_map)