diff --git a/doc/dev/release-checklists.rst b/doc/dev/release-checklists.rst index 3a3b2a98cd7..f6a4dca3907 100644 --- a/doc/dev/release-checklists.rst +++ b/doc/dev/release-checklists.rst @@ -146,6 +146,7 @@ First release candidate - [ ] src/ceph_release: change type to `rc` - [ ] opt-in to all telemetry channels, generate telemetry reports, and verify no sensitive details (like pools names) are collected +- [ ] check if new pool flags exist in pg_pool_t (osd/osd_types.h), and add them to telemetry's basic_pool_flags collection, in case they are not sensitive First stable release diff --git a/doc/mgr/telemetry.rst b/doc/mgr/telemetry.rst index 90d45766c15..2d09bb9f357 100644 --- a/doc/mgr/telemetry.rst +++ b/doc/mgr/telemetry.rst @@ -186,6 +186,7 @@ List all collections with:: NAME STATUS DESC basic_base NOT REPORTING: NOT OPTED-IN Basic information about the cluster (capacity, number and type of daemons, version, etc.) basic_mds_metadata NOT REPORTING: NOT OPTED-IN MDS metadata + basic_pool_flags NOT REPORTING: NOT OPTED-IN Per-pool flags 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 diff --git a/src/pybind/mgr/telemetry/module.py b/src/pybind/mgr/telemetry/module.py index f729b9180cf..e4e238a88f2 100644 --- a/src/pybind/mgr/telemetry/module.py +++ b/src/pybind/mgr/telemetry/module.py @@ -71,6 +71,7 @@ class Collection(str, enum.Enum): basic_rook_v01 = 'basic_rook_v01' perf_memory_metrics = 'perf_memory_metrics' basic_pool_options_bluestore = 'basic_pool_options_bluestore' + basic_pool_flags = 'basic_pool_flags' MODULE_COLLECTION : List[Dict] = [ { @@ -139,6 +140,12 @@ MODULE_COLLECTION : List[Dict] = [ "channel": "basic", "nag": False }, + { + "name": Collection.basic_pool_flags, + "description": "Per-pool flags", + "channel": "basic", + "nag": False + }, ] ROOK_KEYS_BY_COLLECTION : List[Tuple[str, Collection]] = [ @@ -1109,7 +1116,37 @@ class Module(MgrModule): for option in bluestore_options: if option in pool['options']: pool_data['options'][option] = pool['options'][option] + + # basic_pool_flags collection + if self.is_enabled_collection(Collection.basic_pool_flags): + if 'flags_names' in pool and pool['flags_names'] is not None: + # flags are defined in pg_pool_t (src/osd/osd_types.h) + flags_to_report = [ + 'hashpspool', + 'full', + 'ec_overwrites', + 'incomplete_clones', + 'nodelete', + 'nopgchange', + 'nosizechange', + 'write_fadvise_dontneed', + 'noscrub', + 'nodeep-scrub', + 'full_quota', + 'nearfull', + 'backfillfull', + 'selfmanaged_snaps', + 'pool_snaps', + 'creating', + 'eio', + 'bulk', + 'crimson', + ] + + pool_data['flags_names'] = [flag for flag in pool['flags_names'].split(',') if flag in flags_to_report] + cast(List[Dict[str, Any]], report['pools']).append(pool_data) + if 'rbd' in pool['application_metadata']: rbd_num_pools += 1 ioctx = self.rados.open_ioctx(pool['pool_name'])