]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: do not convert LVs's symlink to real path 59989/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Thu, 4 Jul 2024 11:59:37 +0000 (11:59 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Thu, 26 Sep 2024 07:01:05 +0000 (07:01 +0000)
commit9d94e541c553f5c7307ffba20c00f2c28634604f
tree9d1fa17fe10b51b3770a5b5bfafe5e015e0967b3
parent2ad4714859ed804dfbfbc9a15b6928c6b5d8cdb2
ceph-volume: do not convert LVs's symlink to real path

This commit:
- Adds a new function `get_lvm_mappers` in `ceph_volume/util/disk.py`
  to retrieve a list of LVM device mappers.
- Updates the `is_lv` property in `ceph_volume/util/device.py`
  to use the new `get_lvm_mappers` function for better accuracy.
- Modifies the symlink handling in `Device` class to properly
  identify LVM logical volumes.
- Adds a new test `test_reject_lv_symlink_to_device` to ensure
  LVM symlinks are correctly identified and handled.
- Updates relevant tests to cover the changes in LVM device detection.

These changes improve the reliability and accuracy of LVM device detection
and handling, ensuring that symlinks to LVM logical volumes are
correctly processed.

Fixes: https://tracker.ceph.com/issues/61597
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
Co-Authored-by: Jerry Pu <jerrypu@qnap.com>
(cherry picked from commit 729c5de4f852f1a1ee90e76b71157e9070af7d99)
src/ceph-volume/ceph_volume/tests/devices/lvm/test_migrate.py
src/ceph-volume/ceph_volume/tests/util/test_device.py
src/ceph-volume/ceph_volume/util/device.py
src/ceph-volume/ceph_volume/util/disk.py