From 03d84f131605e68423d7d9a46fe5d4ae2660deba Mon Sep 17 00:00:00 2001
From: Carlos Eduardo <ces.eduardo98@gmail.com>
Date: Mon, 24 Jun 2024 18:44:53 -0300
Subject: [PATCH] [manila] Enforce cephfsnative as the default driver

During the devstack setup, if you have set `CEPHADM_DEPLOY=True`,
we are not considering cephfsnative as the default driver, even
though it was the expected behavior before.

If we do not set this flag and it is not set in the local.conf,
the devstack setup fails.

That is fixed by enforcing `cephfsnative` as the default value for
the Ceph backend. In case users want to deploy devstack with Ceph
NFS, they can continue using the same workflow (setting
`MANILA_CEPH_DRIVER=cephfsnfs`).

Change-Id: I51660fa2466fff873f2230e683661b53874bf862
Signed-off-by: Carlos Eduardo <ces.eduardo98@gmail.com>
---
 devstack/override-defaults | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/devstack/override-defaults b/devstack/override-defaults
index aa80ef17..79f09d8d 100644
--- a/devstack/override-defaults
+++ b/devstack/override-defaults
@@ -19,5 +19,9 @@ if [[ $ENABLE_CEPH_CINDER == "True" ]]; then
     fi
 fi
 
+if [[ $ENABLE_CEPH_MANILA == "True" ]]; then
+    MANILA_CEPH_DRIVER=${MANILA_CEPH_DRIVER:-cephfsnative}
+fi
+
 CEPHADM_DEPLOY=$(trueorfalse False CEPHADM_DEPLOY)
 REMOTE_CEPH=$(trueorfalse False REMOTE_CEPH)