From: Alfredo Deza Date: Tue, 10 Apr 2018 00:00:27 +0000 (-0400) Subject: ceph-volume lvm.activate error if no bluestore OSDs are found X-Git-Tag: v12.2.5~36^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f8ba4e556fa23dac088f99e71cdd9f006a7b7f91;p=ceph.git ceph-volume lvm.activate error if no bluestore OSDs are found Signed-off-by: Alfredo Deza (cherry picked from commit b1920d6e731f194c4829810d849dba6b087ce3a4) --- diff --git a/src/ceph-volume/ceph_volume/devices/lvm/activate.py b/src/ceph-volume/ceph_volume/devices/lvm/activate.py index 1f9cb68e1d50..882824a20ad3 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/activate.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/activate.py @@ -111,6 +111,8 @@ def get_osd_device_path(osd_lv, lvs, device_type, dmcrypt_secret=None): def activate_bluestore(lvs): # find the osd osd_lv = lvs.get(lv_tags={'ceph.type': 'block'}) + if not osd_lv: + raise RuntimeError('could not find a bluestore OSD to activate') is_encrypted = osd_lv.tags.get('ceph.encrypted', '0') == '1' dmcrypt_secret = None osd_id = osd_lv.tags['ceph.osd_id']