Update OSD replacement functionality

1. Simplify this by leveraging the existing remove_osd/add_osd
functions, since its task was functionally identical to those two in
sequential order.
2. Add support for split OSDs within the command (replacing all OSDs on
the block device(s) as required).
3. Add additional configurability and flexibility around the old device,
weight, and external DB LVs.
This commit is contained in:
2023-11-03 01:45:49 -04:00
parent 3cb8a70f04
commit 64e37ae963
6 changed files with 279 additions and 279 deletions

View File

@ -1398,11 +1398,21 @@ def ceph_osd_add(
@ZKConnection(config)
def ceph_osd_replace(zkhandler, osd_id, device, weight):
def ceph_osd_replace(
zkhandler,
osd_id,
new_device,
old_device=None,
weight=None,
ext_db_ratio=None,
ext_db_size=None,
):
"""
Replace a Ceph OSD in the PVC Ceph storage cluster.
"""
retflag, retdata = pvc_ceph.replace_osd(zkhandler, osd_id, device, weight)
retflag, retdata = pvc_ceph.replace_osd(
zkhandler, osd_id, new_device, old_device, weight, ext_db_ratio, ext_db_size
)
if retflag:
retcode = 200