From 30d17788a915a2f49856fbd20f61638d42553b74 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Thu, 5 Jul 2018 11:40:28 -0400 Subject: [PATCH] ceph-volume lvm.prepare do not pass the name when creating a vg Signed-off-by: Alfredo Deza --- src/ceph-volume/ceph_volume/devices/lvm/prepare.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ceph-volume/ceph_volume/devices/lvm/prepare.py b/src/ceph-volume/ceph_volume/devices/lvm/prepare.py index 824a7c95936..f31405ddf56 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/prepare.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/prepare.py @@ -1,7 +1,6 @@ from __future__ import print_function import json import logging -import uuid from textwrap import dedent from ceph_volume.util import prepare as prepare_utils from ceph_volume.util import encryption as encryption_utils @@ -192,12 +191,11 @@ class Prepare(object): """ if disk.is_partition(arg) or disk.is_device(arg): # we must create a vg, and then a single lv - vg_name = "ceph-%s" % str(uuid.uuid4()) - api.create_vg(vg_name, arg) + vg = api.create_vg(arg) lv_name = "osd-%s-%s" % (device_type, osd_fsid) return api.create_lv( lv_name, - vg_name, # the volume group + vg.name, # the volume group tags={'ceph.type': device_type}) else: error = [