]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: fix raw list for lvm devices 52429/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Thu, 13 Jul 2023 12:26:58 +0000 (12:26 +0000)
committerGuillaume Abrioux <gabrioux@ibm.com>
Wed, 19 Jul 2023 08:17:00 +0000 (10:17 +0200)
raw list shouldn't list lvm OSDs.
This confuses the generic activate process given that it relies
on the raw list to detect which kind of OSD is being activated.

Fixes: https://tracker.ceph.com/issues/62002
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
src/ceph-volume/ceph_volume/devices/raw/list.py

index b1a5215b7eb64c32afeb6a32cdc470db0979e8bb..0f801701b8065ca7aa03fae47fe73716af0e6a16 100644 (file)
@@ -89,6 +89,9 @@ 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: