From e810e0526272528c07f2baed5344d087ab08b28c Mon Sep 17 00:00:00 2001 From: Mudit Agarwal Date: Fri, 15 Sep 2023 10:55:31 +0530 Subject: [PATCH] Revert "Bug 2234735:[release-4.14] Revert "support osd migration in RDR customers"" Signed-off-by: Mudit Agarwal --- controllers/storagecluster/cephcluster.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/controllers/storagecluster/cephcluster.go b/controllers/storagecluster/cephcluster.go index ca8a6b26b8..54f7e16918 100644 --- a/controllers/storagecluster/cephcluster.go +++ b/controllers/storagecluster/cephcluster.go @@ -269,6 +269,12 @@ func (obj *ocsCephCluster) ensureCreated(r *StorageClusterReconciler, sc *ocsv1. // Prevent removal of any RDR optimizations if they are already applied to the existing cluster spec. cephCluster.Spec.Storage.Store = determineOSDStore(cephCluster.Spec.Storage.Store, found.Spec.Storage.Store) + // Use bluestore-rdr if mirrioring is enabled + if sc.Spec.Mirroring.Enabled && !sc.Spec.ExternalStorage.Enable { + cephCluster.Spec.Storage.Store.Type = string(rookCephv1.StoreTypeBlueStoreRDR) + cephCluster.Spec.Storage.Store.UpdateStore = "yes-really-update-store" + } + // Add it to the list of RelatedObjects if found objectRef, err := reference.GetReference(r.Scheme, found) if err != nil {