From 0d2e0f0806e3161ce4d9b5005c48da0fb740018d Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Tue, 2 Oct 2018 11:18:44 -0400 Subject: [PATCH] ceph-volume util.disk when there are no devices mapped, skip to the next one Signed-off-by: Alfredo Deza (cherry picked from commit 9b0f472abadde26fce2a603fca5c466ebb770d4a) --- src/ceph-volume/ceph_volume/util/disk.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ceph-volume/ceph_volume/util/disk.py b/src/ceph-volume/ceph_volume/util/disk.py index dab075b31fae..2682dfbef3f0 100644 --- a/src/ceph-volume/ceph_volume/util/disk.py +++ b/src/ceph-volume/ceph_volume/util/disk.py @@ -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): -- 2.47.3