From: Dimitri Savineau Date: Tue, 3 Nov 2020 23:21:35 +0000 (-0500) Subject: ceph-volume: fix lvm batch auto with full SSDs X-Git-Tag: v14.2.15~4^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=da9f71b1a2c6e42a0f3f4b01480a53f4d7cc9093;p=ceph.git 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) --- 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