X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fceph-volume%2Fceph_volume%2Fdevices%2Flvm%2Factivate.py;h=d46db9edfa5866aa4632134940cdbde02267ca0e;hb=494da23a05e25ed98f5539f3b89e6af3cafe3fec;hp=c691fe7ace665af43ecb8d3aa9aace8da5a70fd3;hpb=931c18d5142274109ebfaecd012da8e5a3ebc67e;p=ceph.git diff --git a/ceph/src/ceph-volume/ceph_volume/devices/lvm/activate.py b/ceph/src/ceph-volume/ceph_volume/devices/lvm/activate.py index c691fe7ac..d46db9edf 100644 --- a/ceph/src/ceph-volume/ceph_volume/devices/lvm/activate.py +++ b/ceph/src/ceph-volume/ceph_volume/devices/lvm/activate.py @@ -109,14 +109,16 @@ def get_osd_device_path(osd_lv, lvs, device_type, dmcrypt_secret=None): encryption_utils.luks_open(dmcrypt_secret, device_lv.lv_path, device_uuid) return '/dev/mapper/%s' % device_uuid return device_lv.lv_path - else: - # this could be a regular device, so query it with blkid - physical_device = disk.get_device_from_partuuid(device_uuid) - if physical_device and is_encrypted: + + # this could be a regular device, so query it with blkid + physical_device = disk.get_device_from_partuuid(device_uuid) + if physical_device: + if is_encrypted: encryption_utils.luks_open(dmcrypt_secret, physical_device, device_uuid) return '/dev/mapper/%s' % device_uuid - return physical_device or None - return None + return physical_device + + raise RuntimeError('could not find %s with uuid %s' % (device_type, device_uuid)) def activate_bluestore(lvs, no_systemd=False):