From 76b3431a91d39fae9e338312d41167dc19f52a9c Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 5 Feb 2020 02:29:14 +0100 Subject: [PATCH] ceph-volume: fix lvm list 17957d9beb42a04b8f180ccb7ba07d43179a41d3 introduced a regression in `lvm list`. When passing a vg/lv path for generating a single report, it fails because the filter used in the `lvs` command isn't right. It uses the lv name instead of the vg name because `os.path.basename(device)` is used while it should be `os.path.dirname(device)` Fixes: https://tracker.ceph.com/issues/43969 Signed-off-by: Guillaume Abrioux (cherry picked from commit 0179fed3ab624830ba77349531763c3e116c82e5) --- src/ceph-volume/ceph_volume/devices/lvm/listing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ceph-volume/ceph_volume/devices/lvm/listing.py b/src/ceph-volume/ceph_volume/devices/lvm/listing.py index f718dd89c9f43..f8a7dda78dd50 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/listing.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/listing.py @@ -169,7 +169,7 @@ class List(object): lv = api.get_first_lv(filters={'vg_name': pv.vg_name}) # or VG. else: - vg_name = os.path.basename(device) + vg_name = os.path.dirname(device) lv = api.get_first_lv(filters={'vg_name': vg_name}) arg_is_vg = True -- 2.39.5