From: Alfredo Deza Date: Tue, 21 Aug 2018 14:58:44 +0000 (-0400) Subject: ceph-volume devices.lvm zap should skip when lv_uuid doesn't exist X-Git-Tag: v13.2.2~69^2~16 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1285d75ed13598e56215de92f5c2a2c3a72fb037;p=ceph.git ceph-volume devices.lvm zap should skip when lv_uuid doesn't exist Signed-off-by: Alfredo Deza (cherry picked from commit 447be1c9cc3a8f83687f8c0d2378dfd175e03959) --- diff --git a/src/ceph-volume/ceph_volume/devices/lvm/zap.py b/src/ceph-volume/ceph_volume/devices/lvm/zap.py index b640f76d4a943..128470720923c 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/zap.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/zap.py @@ -50,7 +50,7 @@ class Zap(object): if lv.tags.get('ceph.cluster_name') and lv.tags.get('ceph.osd_id'): lv_path = "/var/lib/ceph/osd/{}-{}".format(lv.tags['ceph.cluster_name'], lv.tags['ceph.osd_id']) else: - lv_path = lv.path + lv_path = lv.lv_path dmcrypt_uuid = lv.lv_uuid dmcrypt = lv.encrypted if system.path_is_mounted(lv_path): @@ -89,7 +89,9 @@ class Zap(object): vgs = set([pv.vg_name for pv in pvs]) for pv in pvs: vg_name = pv.vg_name - lv = api.get_lv(vg_name=vg_name, lv_uuid=pv.lv_uuid) + lv = None + if pv.lv_uuid: + lv = api.get_lv(vg_name=vg_name, lv_uuid=pv.lv_uuid) if lv: self.unmount_lv(lv)