From: Guillaume Abrioux Date: Wed, 2 Nov 2022 15:03:17 +0000 (+0100) Subject: ceph-volume: fix a bug in get_all_devices_vgs() X-Git-Tag: v18.1.0~643^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F48707%2Fhead;p=ceph.git ceph-volume: fix a bug in get_all_devices_vgs() When a physical volume isn't a member of any volume group, the function `get_all_devices_vgs()` in `ceph_volume.api.lvm` shouldn't try to return an `VolumeGroup()` object against this device. Fixes: https://tracker.ceph.com/issues/57918 Signed-off-by: Guillaume Abrioux --- diff --git a/src/ceph-volume/ceph_volume/api/lvm.py b/src/ceph-volume/ceph_volume/api/lvm.py index b23466b7aa3c..5277102da9b2 100644 --- a/src/ceph-volume/ceph_volume/api/lvm.py +++ b/src/ceph-volume/ceph_volume/api/lvm.py @@ -794,7 +794,7 @@ def get_all_devices_vgs(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']] ################################# #