From: Alfredo Deza Date: Fri, 20 Oct 2017 12:10:51 +0000 (-0400) Subject: ceph-volume api.lvm allow full paths to detect lv from arguments X-Git-Tag: v12.2.2~83^2~32 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=654e06f1202596d5cecef9d03134861eed053882;p=ceph.git ceph-volume api.lvm allow full paths to detect lv from arguments Signed-off-by: Alfredo Deza (cherry picked from commit 8d257101b1556ec5ce805622e9b7b6b74f6b000d) --- diff --git a/src/ceph-volume/ceph_volume/api/lvm.py b/src/ceph-volume/ceph_volume/api/lvm.py index 2fb5138cfced..110e990071f8 100644 --- a/src/ceph-volume/ceph_volume/api/lvm.py +++ b/src/ceph-volume/ceph_volume/api/lvm.py @@ -137,6 +137,10 @@ def get_lv_from_argument(argument): in the form of `vg/lv`, but with some validation so that an argument that is a full path to a device can be ignored """ + if argument.startswith('/'): + lv = get_lv(lv_path=argument) + if lv: + return lv try: vg_name, lv_name = argument.split('/') except (ValueError, AttributeError):