From c7a10d5ffbbfe657fc561a70c3188cd5a60c69bb Mon Sep 17 00:00:00 2001 From: Thiago Miranda Date: Tue, 23 Dec 2025 08:33:23 -0300 Subject: [PATCH] Make Glance storage-init flexible per enabled storage backends MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This update enhances the Glance storage-init script to properly handle multiple storage backends. Backends such as file, cinder, and pvc—commonly used for NetApp NFS/iSCSI bypass Ceph initialization and emit an informational message. The existing Ceph (rbd) bootstrap logic remains unchanged and is executed only when rbd is the selected backend, ensuring correct behavior in both single-backend and mixed-backend deployments. TEST PLAN: All tests were run on the following environment: Virtual Environment with AIO-SX + NetApp simulator PASS - build-pkgs -a -l openstack PASS - build stx-openstack tarball PASS - application upload, apply and remove PASS - apply on Ceph only: ceph bootstrapped, netapp logic skipped and an openstack image must be created PASS - apply on NetApp only: ceph logic skipped, show netapp message and an openstack image must be created PASS - apply on Ceph and NetApp: ceph bootstrapped, show netapp message and an openstack image must be created Story: 2011281 Task: 53510 Related-to: e95311b336bad379b5f3db79db90df90f618d0fc Related-to: f24abb1d2f1726020655de0142041cde6873bcc3 Related-to: e95311b336bad379b5f3db79db90df90f618d0fc Change-Id: I876b8687885d5a446d20ded8a187fe9d2a2c1526 Signed-off-by: Thiago Miranda --- ...ks-to-skip-Ceph-init-for-NetApp-stor.patch | 33 +++++++++++++++++++ .../debian/deb_folder/patches/series | 1 + 2 files changed, 34 insertions(+) create mode 100644 openstack-helm/debian/deb_folder/patches/0032-Add-backend-checks-to-skip-Ceph-init-for-NetApp-stor.patch diff --git a/openstack-helm/debian/deb_folder/patches/0032-Add-backend-checks-to-skip-Ceph-init-for-NetApp-stor.patch b/openstack-helm/debian/deb_folder/patches/0032-Add-backend-checks-to-skip-Ceph-init-for-NetApp-stor.patch new file mode 100644 index 000000000..6da16191b --- /dev/null +++ b/openstack-helm/debian/deb_folder/patches/0032-Add-backend-checks-to-skip-Ceph-init-for-NetApp-stor.patch @@ -0,0 +1,33 @@ +From dc2d4dae1df45be1d0a6f27b1bd3edf72ae355e2 Mon Sep 17 00:00:00 2001 +From: Thiago Miranda +Date: Mon, 22 Dec 2025 18:38:00 -0300 +Subject: [PATCH] Add backend checks to skip Ceph init for NetApp storage + +Introduce conditional logic to skip Ceph initialization when using +NetApp backends (file, cinder, or pvc). +The script now prints an informational message and only runs the Ceph +bootstrap when the backend is rbd. + +Signed-off-by: Thiago Miranda +--- + glance/templates/bin/_storage-init.sh.tpl | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/glance/templates/bin/_storage-init.sh.tpl b/glance/templates/bin/_storage-init.sh.tpl +index f780ff9e8..53ba9f155 100644 +--- a/glance/templates/bin/_storage-init.sh.tpl ++++ b/glance/templates/bin/_storage-init.sh.tpl +@@ -30,8 +30,8 @@ if [[ "$SCHEME" == "https" && -f /etc/ssl/certs/openstack-helm.crt ]]; then + fi + + set -ex +-if [ "x$STORAGE_BACKEND" == "xpvc" ]; then +- echo "No action required." ++if [ "x$STORAGE_BACKEND" == "xfile" ] || [ "x$STORAGE_BACKEND" == "xpvc" ]; then ++ echo "INFO: No action required to use $STORAGE_BACKEND backend." + elif [ "x$STORAGE_BACKEND" == "xswift" ]; then + : ${OS_INTERFACE:="internal"} + OS_TOKEN="$(openstack token issue -f value -c id)" +-- +2.34.1 + diff --git a/openstack-helm/debian/deb_folder/patches/series b/openstack-helm/debian/deb_folder/patches/series index e6b4e8334..084fcfc7c 100644 --- a/openstack-helm/debian/deb_folder/patches/series +++ b/openstack-helm/debian/deb_folder/patches/series @@ -29,3 +29,4 @@ 0029-Add-DEX-integration.patch 0030-Add-Netapp-backend-support-to-Cinder.patch 0031-Update-glance-store-config.patch +0032-Add-backend-checks-to-skip-Ceph-init-for-NetApp-stor.patch