]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-volume: Revert "ceph-volume: fix raw list for lvm devices"
authorGuillaume Abrioux <gabrioux@ibm.com>
Tue, 7 Nov 2023 13:39:50 +0000 (14:39 +0100)
committerGuillaume Abrioux <gabrioux@ibm.com>
Thu, 9 Nov 2023 08:03:09 +0000 (09:03 +0100)
This reverts commit e5e429617c1c27dcd631171f65d30571e32f7266.
This commit introduced a regression, see linked tracker for details.

Fixes: https://tracker.ceph.com/issues/63391
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit 916a22ef031953056771eceb1f49cab7eb746978)

src/ceph-volume/ceph_volume/devices/raw/list.py

index 0f801701b8065ca7aa03fae47fe73716af0e6a16..c86353b90ecc8e97957b05f387d5a65070be2ef1 100644 (file)
@@ -69,7 +69,7 @@ class List(object):
     def generate(self, devs=None):
         logger.debug('Listing block devices via lsblk...')
         info_devices = disk.lsblk_all(abspath=True)
-        if devs is None or devs == []:
+        if not devs or not any(devs):
             # If no devs are given initially, we want to list ALL devices including children and
             # parents. Parent disks with child partitions may be the appropriate device to return if
             # the parent disk has a bluestore header, but children may be the most appropriate
@@ -89,9 +89,6 @@ class List(object):
             # determine whether a parent is bluestore, we should err on the side of not reporting
             # the child so as not to give a false negative.
             info_device = [info for info in info_devices if info['NAME'] == dev][0]
-            if info_device['TYPE'] == 'lvm':
-                # lvm devices are not raw devices
-                continue
             if 'PKNAME' in info_device and info_device['PKNAME'] != "":
                 parent = info_device['PKNAME']
                 try: