]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: PVolumes.get() should return one PV when using name or uuid 23234/head
authorAndrew Schoen <aschoen@redhat.com>
Wed, 25 Jul 2018 16:47:27 +0000 (11:47 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Wed, 25 Jul 2018 16:47:27 +0000 (11:47 -0500)
commite5e866e8ecaf0522f3ebac83fa6fbc5a666acd58
treec04c1e08e839c74fb36bfb791f285d38f4d9cd07
parent44b91324816c9dd3a8eb5c6aba2d419a2aeab067
ceph-volume: PVolumes.get() should return one PV when using name or uuid

It is possible to get duplicated pv entires from the 'pvs' lvm command.
If we're using PVolumes.get() with either pv_name or pv_uuid we can
safely return a single PVolume object. However, if we use pv_tags with
PVolumes.get() we must still raise a MultiplePVsError if many pvs
are found that have the tags, because they are not guaranteed to be the
same pv, as would be the case with pv_name or pv_uuid.

Fixes: http://tracker.ceph.com/issues/24784
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
src/ceph-volume/ceph_volume/api/lvm.py
src/ceph-volume/ceph_volume/tests/api/test_lvm.py