Project

General

Profile

Actions

Bug #62320

open

lvm list should filter also on vg name

Added by Gilles Mocellin 9 months ago. Updated 2 months ago.

Status:
Pending Backport
Priority:
Normal
Target version:
% Done:

0%

Source:
Community (user)
Tags:
backport_processed
Backport:
reef,quincy
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

I have a cluster build on custom created LVM volumes (because I use multipath, and the cluster was build in 2017/mimic erra.

For example, with ceph-ansible I have :

lvm_volumes:
  - data: data-lv1
    data_vg: data-vg1
    crush_device_class: sas15k
  - data: data-lv1
    data_vg: data-vg2
    crush_device_class: sas15k

[...]

You can see that all the LVs have the same name in different VG.

ceph-volume filter only on lv_name :
single_report function in /usr/lib/python3/dist-packages/ceph_volume/devices/lvm/listing.py :

        if isinstance(arg, int) or arg.isdigit():
            lv = api.get_lvs_from_osd_id(arg)
        elif arg[0] == '/':
            lv = api.get_lvs_from_path(arg)
        else:
            *lv = [api.get_single_lv(filters={'lv_name': arg.split('/')[1]})]*

So it fails like that :

$ sudo ceph-volume --cluster ceph lvm list data-vg1/data-lv1 --format=json
-->  RuntimeError: Filters {'lv_name': 'data-lv1'} matched more than 1 LV present on this host.

With only ceph-volume, I can workaround by passing the fulldevice path /dev/vg/lv, but it breaks my ceph-ansible, where I can't present devices in another way.
And, the doc says we can use vg/lv devices, so It should work.

I suppose api.get_single_lv() can have multiple filters, one on vg_name should be fine.


Related issues 2 (2 open0 closed)

Copied to ceph-volume - Backport #64642: reef: lvm list should filter also on vg nameNewGuillaume AbriouxActions
Copied to ceph-volume - Backport #64643: quincy: lvm list should filter also on vg nameNewGuillaume AbriouxActions
Actions

Also available in: Atom PDF