]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: fix loop devices support 61420/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Tue, 7 Jan 2025 08:42:15 +0000 (08:42 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Thu, 16 Jan 2025 16:23:02 +0000 (16:23 +0000)
commit6f7fc99cb452bb760c1aee0c37f19349bb89f69b
treec28de4337da4c089ac8d3c5ce374ff3e73b9787e
parent47722f163f60b2b23d19e150e4172797087771eb
ceph-volume: fix loop devices support

This commit updates the `is_device` function to correctly handle
loop devices.
The function now validates loop devices when they are explicitly
allowed, by checking their type (`loop`) in addition to `disk`
and `mpath`.

Changes include:
  - Extending the type check to include `loop` in the list of
    supported device types.
  - Enhancing the docstring for better documentation of the
    function's purpose and behavior.

These changes ensure that loop devices are properly recognized
and handled when configuring OSDs in ceph-volume.

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