]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
python-common/ceph/deployment/translate: use 'prepare' instead of 'batch' for trivial...
authorSage Weil <sage@redhat.com>
Wed, 29 Jan 2020 17:41:41 +0000 (11:41 -0600)
committerSage Weil <sage@redhat.com>
Wed, 29 Jan 2020 17:41:41 +0000 (11:41 -0600)
This works around ceph-volumes lack of support for preexisting LVs in the
batch mode.

Signed-off-by: Sage Weil <sage@redhat.com>
src/python-common/ceph/deployment/translate.py

index b7b04737469244a319b1691785346d97ebe22db4..3c51db6bdb9703a1faccaa5f2e8b4e4fc458cfe6 100644 (file)
@@ -42,6 +42,16 @@ class to_ceph_volume(object):
 
             cmd += " --filestore"
 
+        # HORRIBLE HACK
+        if self.spec.objectstore == 'bluestore' and \
+           not self.spec.encrypted and \
+           not self.spec.osds_per_device and \
+           len(data_devices) == 1 and \
+           not db_devices and \
+           not wal_devices:
+            cmd = "lvm prepare --bluestore --data %s --no-systemd" % (' '.join(data_devices))
+            return cmd
+
         if self.spec.objectstore == 'bluestore':
 
             cmd = "lvm batch --no-auto {}".format(" ".join(data_devices))