]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: fix is_ceph_device for lvm batch
authorDimitri Savineau <dsavinea@redhat.com>
Tue, 11 Feb 2020 21:53:55 +0000 (16:53 -0500)
committerJan Fajerski <jfajerski@suse.com>
Fri, 28 Feb 2020 12:54:53 +0000 (13:54 +0100)
commit4e107cd283022261917111be532ef55301149c36
treeccfd463b4765bf34dc1a6b4f3ea5a2931eed0447
parent727de7f8bccf9127c8f4dced19c93ddcc9508936
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>
(cherry picked from commit a82582364c7b65a4a5e2673e3886acd6d2066130)
src/ceph-volume/ceph_volume/api/lvm.py