which erasure code profile plugin and parameters are in use
- how many hosts are in the cluster, and how many hosts have each type of daemon
- whether a separate OSD cluster network is being used
+ - how many RBD pools and images are in the cluster, and how many pools have RBD mirroring enabled
If you had telemetry enabled, you will need to re-opt-in with::
import errno
import hashlib
import json
+import rbd
import re
import requests
import uuid
# - added more pool metadata (rep vs ec, cache tiering mode, ec profile)
# - added host count, and counts for hosts with each of (mon, osd, mds, mgr)
# - whether an OSD cluster network is in use
+# - rbd pool and image count, and rbd mirror mode (pool-level)
class Module(MgrModule):
config = dict()
report['config'] = self.gather_configs()
# pools
+ report['rbd'] = {
+ 'num_pools': 0,
+ 'num_images_by_pool': [],
+ 'mirroring_by_pool': [],
+ }
num_pg = 0
report['pools'] = list()
for pool in osd_map['pools']:
'cache_mode': pool['cache_mode'],
}
)
+ if 'rbd' in pool['application_metadata']:
+ report['rbd']['num_pools'] += 1
+ ioctx = self.rados.open_ioctx(pool['pool_name'])
+ report['rbd']['num_images_by_pool'].append(
+ sum(1 for _ in rbd.RBD().list2(ioctx)))
+ report['rbd']['mirroring_by_pool'].append(
+ rbd.RBD().mirror_mode_get(ioctx) != rbd.RBD_MIRROR_MODE_DISABLED)
# osds
cluster_network = False