]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: fix batch refactor regression 51207/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Thu, 13 Apr 2023 14:42:32 +0000 (16:42 +0200)
committerGuillaume Abrioux <gabrioux@ibm.com>
Tue, 25 Apr 2023 08:09:14 +0000 (10:09 +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>
(cherry picked from commit 98c68f2c8f648a5b9faac295999de212d362744d)

src/ceph-volume/ceph_volume/devices/lvm/batch.py

index 75019a6755f50521652ff311193a29050c2c2cc5..d4e78fc75cdc50ee6e518198bbe175ebfb7fd27e 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