]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
ceph-volume: use udev data instead of LVM subprocess in get_devices()
authorGuillaume Abrioux <gabrioux@ibm.com>
Wed, 1 Oct 2025 14:04:20 +0000 (16:04 +0200)
committerGuillaume Abrioux <gabrioux@ibm.com>
Tue, 14 Oct 2025 06:08:37 +0000 (06:08 +0000)
commit05e8672887d61a0fa3c4f78bbe5b1c9294607a60
tree7c5aee2be3b54cf84476857b7a7cbf7e8695653a
parent46be1de02d382b368c4276f278ed4ae0c5e88392
ceph-volume: use udev data instead of LVM subprocess in get_devices()

Replace the  check using `lvm.get_device_lvs(diskname)`, which
spawned a `pvs` subprocess, with a direct check on `/run/udev/data`
via `UdevData(diskname).is_lvm`.

This avoids spawning subprocesses while scanning devices. It improves
performance on systems with many disks, and keeps the device filtering
logic intact.

Fixes: https://tracker.ceph.com/issues/73334
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit ea7aa27452f47f0808871abc366daa3bd7b6d2ab)
src/ceph-volume/ceph_volume/tests/util/test_disk.py
src/ceph-volume/ceph_volume/util/disk.py