From: Andrew Schoen Date: Tue, 13 Nov 2018 19:02:39 +0000 (-0600) Subject: ceph-volume: return lvs as vg/lv from ValidDevice if as_string is True X-Git-Tag: v12.2.10~6^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=3856fae2bd1dbcc58f40303f911039c80572b375;p=ceph.git ceph-volume: return lvs as vg/lv from ValidDevice if as_string is True All code in prepare and activate expect lvs to be in that format. Eventually we can refactor all that to use the Device class as well. Signed-off-by: Andrew Schoen Resolves: rm#27062 (cherry picked from commit fdf7f3c575299b6be0ac40fb6eee5106cea010c9) --- diff --git a/src/ceph-volume/ceph_volume/util/arg_validators.py b/src/ceph-volume/ceph_volume/util/arg_validators.py index d13ed87804874..534c9aa646736 100644 --- a/src/ceph-volume/ceph_volume/util/arg_validators.py +++ b/src/ceph-volume/ceph_volume/util/arg_validators.py @@ -23,6 +23,9 @@ class ValidDevice(object): raise argparse.ArgumentError(None, error) if self.as_string: + if device.is_lv: + # all codepaths expect an lv path to be returned in this format + return "{}/{}".format(device.vg_name, device.lv_name) return string return device