[
{'data': {<metadata>},
'osdspec': <name of osdspec>,
- 'host': <name of host>
+ 'host': <name of host>,
+ 'notes': <notes>
},
{'data': ...,
'osdspec': ..,
- 'host': ..
+ 'host': ...,
+ 'notes': ...
}
]
except ValueError:
logger.exception('Cannot decode JSON: \'%s\'' % ' '.join(out))
concat_out = {}
-
+ notes = []
+ if osdspec.data_devices is not None and osdspec.data_devices.limit and len(concat_out) < osdspec.data_devices.limit:
+ found = len(concat_out)
+ limit = osdspec.data_devices.limit
+ notes.append(
+ f'NOTE: Did not find enough disks matching filter on host {host} to reach data device limit (Found: {found} | Limit: {limit})')
ret_all.append({'data': concat_out,
'osdspec': osdspec.service_id,
- 'host': host})
+ 'host': host,
+ 'notes': notes})
return ret_all
def resolve_hosts_for_osdspecs(self,
table.align = 'l'
table.left_padding_width = 0
table.right_padding_width = 2
+ notes = ''
for osd_data in data:
if osd_data.get('service_type') != 'osd':
continue
if spec.get('error'):
return spec.get('message')
dg_name = spec.get('osdspec')
+ if spec.get('notes', []):
+ notes += '\n'.join(spec.get('notes')) + '\n'
for osd in spec.get('data', []):
db_path = osd.get('block_db', '-')
wal_path = osd.get('block_wal', '-')
if not block_data:
continue
table.add_row(('osd', dg_name, host, block_data, db_path, wal_path))
- return table.get_string()
+ return notes + table.get_string()
def preview_table_services(data: List) -> str: