]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-volume lvm.prepare do not pass the name when creating a vg
authorAlfredo Deza <adeza@redhat.com>
Thu, 5 Jul 2018 15:40:28 +0000 (11:40 -0400)
committerAlfredo Deza <adeza@redhat.com>
Mon, 16 Jul 2018 13:57:40 +0000 (09:57 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/devices/lvm/prepare.py

index 824a7c95936c5e2aa709b180cb114453094483c1..f31405ddf56c31198198ce2989039984e39f934d 100644 (file)
@@ -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 = [