From da9f71b1a2c6e42a0f3f4b01480a53f4d7cc9093 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Tue, 3 Nov 2020 18:21:35 -0500 Subject: [PATCH] ceph-volume: fix lvm batch auto with full SSDs 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 (cherry picked from commit 2a854ca373fadef099a1d037930eb241e757b2c3) --- src/ceph-volume/ceph_volume/devices/lvm/batch.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ceph-volume/ceph_volume/devices/lvm/batch.py b/src/ceph-volume/ceph_volume/devices/lvm/batch.py index 37e099fda01e5..2dbe20f05e4d8 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/batch.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/batch.py @@ -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 -- 2.39.5