]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: lvm: get_device_vgs() filter by provided prefix
authorYehuda Sadeh <yehuda@redhat.com>
Sat, 22 Feb 2020 01:44:11 +0000 (17:44 -0800)
committerJan Fajerski <jfajerski@suse.com>
Fri, 28 Feb 2020 14:01:05 +0000 (15:01 +0100)
Fixes: https://tracker.ceph.com/issues/44246
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit b48caf4873c11690d36a88760504f98b46101995)

src/ceph-volume/ceph_volume/api/lvm.py

index 7f41f56ff531d0aa4471fb2143388537887236ce..b179fb593938342382869818af793700597206f0 100644 (file)
@@ -866,7 +866,7 @@ def get_device_vgs(device, name_prefix=''):
         verbose_on_failure=False
     )
     vgs = _output_parser(stdout, VG_FIELDS)
-    return [VolumeGroup(**vg) for vg in vgs]
+    return [VolumeGroup(**vg) for vg in vgs if vg['vg_name'].startswith(name_prefix)]
 
 
 #################################