From: Guillaume Abrioux Date: Thu, 13 Apr 2023 14:42:32 +0000 (+0200) Subject: ceph-volume: fix batch refactor regression X-Git-Tag: v16.2.14~172^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=86159550086b0c880e197acbfc736025bf832bac;p=ceph.git ceph-volume: fix batch refactor regression This makes sure `ceph-volume lvm batch` will recreate the db device with the right size when coming from a cluster deployed prior to 14.2.13 Fixes: https://tracker.ceph.com/issues/59442 Signed-off-by: Guillaume Abrioux (cherry picked from commit 98c68f2c8f648a5b9faac295999de212d362744d) --- diff --git a/src/ceph-volume/ceph_volume/devices/lvm/batch.py b/src/ceph-volume/ceph_volume/devices/lvm/batch.py index 75019a6755f50..d4e78fc75cdc5 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/batch.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/batch.py @@ -126,7 +126,10 @@ def get_physical_fast_allocs(devices, type_, fast_slots_per_device, new_osds, ar if vg_name == 'unused_devices': slots_for_vg = requested_slots else: - slots_for_vg = len(vg_devices) * requested_slots + if len(vg_devices) > 1: + slots_for_vg = len(args.devices) + else: + slots_for_vg = len(vg_devices) * requested_slots dev_size = dev.vg_size[0] # this only looks at the first vg on device, unsure if there is a better # way