mirror of
https://github.com/ceph/ceph
synced 2025-03-30 07:19:14 +00:00
ceph-volume: fix is_ceph_device for lvm batch
This is a regression introduced by 634a709
The lvm batch command fails to prepare the OSDs on the created LV.
When using lvm batch, the LV/VG are created prior the OSD prepare.
During that creation, multiple tags are set with null value.
$ lvs -o lv_tags --noheadings
ceph.cluster_fsid=null,ceph.osd_fsid=null,ceph.osd_id=null,ceph.type=null
Since we call is_ceph_device which returns True if the ceph.osd_id LVM
tag exists but doesn't test the value then we raise an execption.
When the tag value is set to 'null' then we can consider that the device
isn't part of the ceph cluster (because not yet prepared).
Closes: https://tracker.ceph.com/issues/44069
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
This commit is contained in:
parent
19122bba3d
commit
a82582364c
@ -274,7 +274,10 @@ def is_ceph_device(lv):
|
||||
logger.warning('device is not part of ceph: %s', lv)
|
||||
return False
|
||||
|
||||
return True
|
||||
if lv.tags['ceph.osd_id'] == 'null':
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
####################################
|
||||
|
Loading…
Reference in New Issue
Block a user