]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 28 Aug 2018 16:03:10 +0000 (11:03 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 30d17788a915a2f49856fbd20f61638d42553b74)

src/ceph-volume/ceph_volume/devices/lvm/prepare.py

index 718515e2b0e71532c04d675fff6a6a8a43b40f0e..aedb71ed5d63cfed45ad07fb75018a41b35bedc8 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 = [