From: Naveen Naidu Date: Sun, 3 Nov 2024 06:02:05 +0000 (+0530) Subject: mgr/telemetry: add stretch_mode information X-Git-Tag: v20.0.0~118^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6472b6b9f94affb96be341c9d595e543d734f30b;p=ceph.git mgr/telemetry: add stretch_mode information Stretch Mode information helps us learn how deployments are done for stretch clusters. We add a basic_stretch_cluster collection fo the "basic" channel for this purpose. Fixes: https://tracker.ceph.com/issues/67812 Signed-off-by: Naveen Naidu --- diff --git a/doc/mgr/telemetry.rst b/doc/mgr/telemetry.rst index 2d09bb9f3577..be82f1b2c3f7 100644 --- a/doc/mgr/telemetry.rst +++ b/doc/mgr/telemetry.rst @@ -190,6 +190,7 @@ List all collections with:: basic_pool_options_bluestore NOT REPORTING: NOT OPTED-IN Per-pool bluestore config options basic_pool_usage NOT REPORTING: NOT OPTED-IN Default pool application and usage statistics basic_rook_v01 NOT REPORTING: NOT OPTED-IN Basic Rook deployment data + basic_stretch_cluster NOT REPORTING: NOT OPTED-IN Stretch Mode information for stretch clusters deployments basic_usage_by_class NOT REPORTING: NOT OPTED-IN Default device class usage statistics crash_base NOT REPORTING: NOT OPTED-IN Information about daemon crashes (daemon type and version, backtrace, etc.) device_base NOT REPORTING: NOT OPTED-IN Information about device health metrics diff --git a/src/pybind/mgr/telemetry/module.py b/src/pybind/mgr/telemetry/module.py index e4e238a88f28..ce05b1353b41 100644 --- a/src/pybind/mgr/telemetry/module.py +++ b/src/pybind/mgr/telemetry/module.py @@ -72,6 +72,7 @@ class Collection(str, enum.Enum): perf_memory_metrics = 'perf_memory_metrics' basic_pool_options_bluestore = 'basic_pool_options_bluestore' basic_pool_flags = 'basic_pool_flags' + basic_stretch_cluster = 'basic_stretch_cluster' MODULE_COLLECTION : List[Dict] = [ { @@ -146,6 +147,12 @@ MODULE_COLLECTION : List[Dict] = [ "channel": "basic", "nag": False }, + { + "name": Collection.basic_stretch_cluster, + "description": "Stretch mode information for stretch clusters", + "channel": "basic", + "nag": False + }, ] ROOK_KEYS_BY_COLLECTION : List[Tuple[str, Collection]] = [ @@ -1318,6 +1325,17 @@ class Module(MgrModule): # Rook self.get_rook_data(report) + # Stretch Mode + if self.is_enabled_collection(Collection.basic_stretch_cluster): + stretch_mode = osd_map.get("stretch_mode", {}) + report['stretch_cluster'] = { + 'stretch_mode_enabled': stretch_mode.get("stretch_mode_enabled", {}), + 'stretch_bucket_count': stretch_mode.get("stretch_bucket_count", {}), + 'degraded_stretch_mode': stretch_mode.get("degraded_stretch_mode", {}), + 'recovering_stretch_mode': stretch_mode.get("recovering_stretch_mode", {}), + 'stretch_mode_bucket': stretch_mode.get("stretch_mode_bucket", {}), + } + if 'crash' in channels: report['crashes'] = self.gather_crashinfo()