]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: fix batch refactor regression 51067/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Thu, 13 Apr 2023 14:42:32 +0000 (16:42 +0200)
committerGuillaume Abrioux <gabrioux@ibm.com>
Fri, 14 Apr 2023 12:41:55 +0000 (14:41 +0200)
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 <gabrioux@ibm.com>
src/ceph-volume/ceph_volume/devices/lvm/batch.py

index 72462ee785754b84a5350b2cd3c3321097e89e23..9ed2bf2fccf43d2a93bb99dfc9b02c4001bda590 100644 (file)
@@ -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