From 770cd09412f933eeb93426a8acfc4f4666c99024 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 2 Nov 2022 16:03:17 +0100 Subject: [PATCH] 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 --- src/ceph-volume/ceph_volume/api/lvm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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']] ################################# # -- 2.47.3