Add support for configurable OSD DB ratios

The default of 0.05 (5%) is likely ideal in the initial implementation,
but allow this to be set explicitly for maximum flexibility in
space-constrained or performance-critical use-cases.
This commit is contained in:
2021-09-23 23:31:58 -04:00
parent d0f3e9e285
commit 65df807b09
7 changed files with 40 additions and 17 deletions

View File

@ -222,19 +222,20 @@ def ceph_osd_list(config, limit):
return False, response.json().get('message', '')
def ceph_osd_add(config, node, device, weight, ext_db_flag):
def ceph_osd_add(config, node, device, weight, ext_db_flag, ext_db_ratio):
"""
Add new Ceph OSD
API endpoint: POST /api/v1/storage/ceph/osd
API arguments: node={node}, device={device}, weight={weight}, ext_db={ext_db_flag}
API arguments: node={node}, device={device}, weight={weight}, ext_db={ext_db_flag}, ext_db_ratio={ext_db_ratio}
API schema: {"message":"{data}"}
"""
params = {
'node': node,
'device': device,
'weight': weight,
'ext_db': ext_db_flag
'ext_db': ext_db_flag,
'ext_db_ratio': ext_db_ratio
}
response = call_api(config, 'post', '/storage/ceph/osd', params=params)