]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: fix a bug in `get_lvm_fast_allocs()` (batch) 52063/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Thu, 4 May 2023 08:08:09 +0000 (10:08 +0200)
committerGuillaume Abrioux <gabrioux@ibm.com>
Wed, 14 Jun 2023 20:13:58 +0000 (22:13 +0200)
commitb0cd6f2540c6f8dad8711a4e68b09268934d0e12
tree2bea89406f249d0a3ac5d008e5ec9837dbef2d57
parent8c43c677d158b5e9f935b49dc88ba15f47f93e49
ceph-volume: fix a bug in `get_lvm_fast_allocs()` (batch)

`get_lvm_fast_allocs()` in `devices/lvm/batch.py` calls the property
`Device.used_by_ceph` in order to filter out devices that are already
used by ceph. The issue is that `Device.used_by_ceph()` itself filters
out journal devices (db/wal) given that a db/wal device can be shared
between multiple OSDs. The consequence is that `Device.used_by_ceph()`
always returns False for a db/wal device (even if it is actually
already used by ceph) so `get_lvm_fast_allocs()` always returns the
full list of the passed db/wal devices on the `lvm batch` CLI command.
Finally, the logic in `devices.lvm.batch.get_deployment_layout()`
checks whether the length of the list returned by `get_lvm_fast_allocs()`
is equal to `num_osds` (the number of OSD being created), if not it fails.

Fixes: https://tracker.ceph.com/issues/59640
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit 8da98bf2ac8cf223904acd971f3a0342bdbd26f9)
src/ceph-volume/ceph_volume/devices/lvm/batch.py
src/ceph-volume/ceph_volume/util/device.py