mirror of
https://github.com/ceph/ceph
synced 2025-01-02 00:52:22 +00:00
Merge pull request #55067 from yaarith/telemetry-pool-flags
mgr/telemetry: add pool flags
This commit is contained in:
commit
24dcb42d41
@ -152,6 +152,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
|
||||
|
@ -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
|
||||
|
@ -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'])
|
||||
|
Loading…
Reference in New Issue
Block a user