]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume util.disk when there are no devices mapped, skip to the next one 24382/head
authorAlfredo Deza <adeza@redhat.com>
Tue, 2 Oct 2018 15:18:44 +0000 (11:18 -0400)
committerAlfredo Deza <adeza@redhat.com>
Tue, 2 Oct 2018 20:57:16 +0000 (16:57 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 9b0f472abadde26fce2a603fca5c466ebb770d4a)

src/ceph-volume/ceph_volume/util/disk.py

index dab075b31faee6abbc32f6e6d2f2fafc606af222..2682dfbef3f060d621742de132f6974ed6b9febb 100644 (file)
@@ -686,6 +686,8 @@ def get_devices(_sys_block_path='/sys/block', _dev_path='/dev', _mapper_path='/d
         # Ensure that the diskname is an absolute path and that it never points
         # to a /dev/dm-* device
         diskname = mapper_devs.get(block) or dev_devs.get(block)
+        if not diskname:
+            continue
 
         # If the mapper device is a logical volume it gets excluded
         if is_mapper_device(diskname):