]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: PVolumes.get() should return one PV when using name or uuid 23329/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:24:49 +0000 (10:24 -0500)
commit464c93a701e05a64f98ec1c4e570791a1365eb31
tree77ae99e6c0cc0807d44fde38131f564d9836f401
parent2843debdb8430f326275ff6a0de1ba2f428acbf6
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