]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: fix lvm batch auto with full SSDs
authorDimitri Savineau <dsavinea@redhat.com>
Tue, 3 Nov 2020 23:21:35 +0000 (18:21 -0500)
committerDimitri Savineau <dsavinea@redhat.com>
Thu, 19 Nov 2020 15:31:37 +0000 (10:31 -0500)
The ceph-volume lvm batch --auto introduced by [1] breaks the backward
compatibility when using non rotational devices only (SSD and/or NVMe).
Those devices are reaffected as bluestore db or filestore journal
devices while we want them as data devices.

Fixes: https://tracker.ceph.com/issues/48106
[1] https://github.com/ceph/ceph/pull/34740

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 2a854ca373fadef099a1d037930eb241e757b2c3)

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

index 37e099fda01e50b42826a4c9ff21a83376b356b3..2dbe20f05e4d8f02138108278d38907c19e01f98 100644 (file)
@@ -369,6 +369,9 @@ class Batch(object):
         ssd = []
         for d in self.args.devices:
             rotating.append(d) if d.rotational else ssd.append(d)
+        if ssd and not rotating:
+            # no need for additional sorting, we'll only deploy standalone on ssds
+            return
         self.args.devices = rotating
         if self.args.filestore:
             self.args.journal_devices = ssd