]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: add CephFS metadata
authorSage Weil <sage@redhat.com>
Tue, 29 Oct 2019 16:08:42 +0000 (11:08 -0500)
committerSage Weil <sage@redhat.com>
Tue, 29 Oct 2019 18:38:44 +0000 (13:38 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
PendingReleaseNotes
src/pybind/mgr/telemetry/module.py

index 3cbe85de7cbf0a6ed77ffc7b34a36a7bca8daf86..a5027defd3a980f2e1cba920f84fa8aff1a6648d 100644 (file)
     ceph config set mgr mgr/telemetry/channel_crash false
     ceph telemetry on
 
+* The telemetry module now reports more information about CephFS file systems,
+  including:
+
+    - how many MDS daemons (in total and per file system)
+    - which features are (or have been) enabled
+    - how many data pools
+    - approximate file system age (year + month of creation)
+
+  If you had telemetry enabled, you will need to re-opt-in with::
+
+    ceph telemetry on
+
+  You can view exactly what information will be reported first with::
+
+    ceph telemetry show        # see everything
+    ceph telemetry show basic  # basic cluster info, including the new CephFS info
+
 * Following invalid settings now are not tolerated anymore
   for the command `ceph osd erasure-code-profile set xxx`.
   * invalid `m` for "reed_sol_r6_op" erasure technique
index de91ebf93cbab14d066159c4bb8eff993237baeb..af57787c2138c36d0401b7a5719a7a8f3f9ad168 100644 (file)
@@ -48,6 +48,7 @@ REVISION = 3
 #
 # Version 3:
 #   - added device health metrics (i.e., SMART data, minus serial number)
+#   - added CephFS metadata (how many MDSs, fs features, how many data pools)
 
 class Module(MgrModule):
     config = dict()
@@ -403,8 +404,31 @@ class Module(MgrModule):
             }
 
             report['fs'] = {
-                'count': len(fs_map['filesystems'])
+                'count': len(fs_map['filesystems']),
+                'feature_flags': fs_map['feature_flags'],
+                'num_standby_mds': len(fs_map['standbys']),
+                'filesystems': [],
             }
+            num_mds = len(fs_map['standbys'])
+            for fsm in fs_map['filesystems']:
+                fs = fsm['mdsmap']
+                report['fs']['filesystems'].append({
+                    'max_mds': fs['max_mds'],
+                    'ever_allowed_features': fs['ever_allowed_features'],
+                    'explicitly_allowed_features': fs['explicitly_allowed_features'],
+                    'num_in': len(fs['in']),
+                    'num_up': len(fs['up']),
+                    'num_standby_replay': len(
+                        [mds for gid, mds in fs['info'].items()
+                         if mds['state'] == 'up:standby-replay']),
+                    'num_mds': len(fs['info']),
+                    'balancer_enabled': len(fs['balancer']) > 0,
+                    'num_data_pools': len(fs['data_pools']),
+                    'standby_count_wanted': fs['standby_count_wanted'],
+                    'approx_ctime': fs['created'][0:7],
+                })
+                num_mds += len(fs['info'])
+            report['fs']['total_num_mds'] = num_mds
 
             report['metadata'] = dict()
             report['metadata']['osd'] = self.gather_osd_metadata(osd_map)