]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: PVolumes.get() should return one PV when using name or uuid 23327/head
authorAndrew Schoen <aschoen@redhat.com>
Wed, 25 Jul 2018 16:47:27 +0000 (11:47 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Mon, 30 Jul 2018 15:23:42 +0000 (10:23 -0500)
commit925f5e87f634dccd24f6b42cebafa5a12c13fc63
tree53c23c44851eee55cdd60b65750d6faa92cea210
parentf3c3015ced374f822e68904c01e0c8e649a5e69e
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>
(cherry picked from commit e5e866e8ecaf0522f3ebac83fa6fbc5a666acd58)
src/ceph-volume/ceph_volume/api/lvm.py
src/ceph-volume/ceph_volume/tests/api/test_lvm.py