From 8ffce7863f85830079d63c514a035a0ed948d8c6 Mon Sep 17 00:00:00 2001 From: jbarboza Date: Thu, 29 Jan 2026 14:49:22 -0300 Subject: [PATCH] Fix for cinder-backup stuck in Init state When the application is installed using storage backends, one of cinder-backup pods is stuck in Init state due to Multi Attach PVC error. The reason it happens is because Trident doesn't support multiple replicas when deployed using storage backends because RWX volumes cannot be created using "ontap-san" (iSCSI/FC) provisioned through Kubernetes PVCs [1]. This update fixes this bug by setting the amount of backup pod replicas to 1 when the application is installed in the described environment. [1] https://docs.netapp.com/us-en/trident/trident-use/ontap-san.html Test Plan: - PASS: Build OpenStack layer packages - PASS: Create and apply custom tarball in an AIO-DX environment NetApp iSCSI: - PASS: apply overrides to deploy the Cinder backup service using NetApp iSCSI - PASS: Check that backup service is `UP` (backup drivers successfully initialized) `openstack volume service list` - PASS: Check that `cinder-backup` pod was deployed with a single replica (kubectl get deployments -n openstack cinder-backup) NetApp NFS: - PASS: apply overrides to deploy the app using NetApp NFS storage backend for Cinder backup - PASS: Check that `cinder-backup` pod was deployed with 2 replicas Closes-Bug: 2138970 Change-Id: I566d2e220b491644c0d3f250993f355f2f87e2c4 Signed-off-by: jbarboza --- .../k8sapp_openstack/k8sapp_openstack/helm/cinder.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/python3-k8sapp-openstack/k8sapp_openstack/k8sapp_openstack/helm/cinder.py b/python3-k8sapp-openstack/k8sapp_openstack/k8sapp_openstack/helm/cinder.py index fb65e9086..2ea460eb4 100644 --- a/python3-k8sapp-openstack/k8sapp_openstack/k8sapp_openstack/helm/cinder.py +++ b/python3-k8sapp-openstack/k8sapp_openstack/k8sapp_openstack/helm/cinder.py @@ -204,6 +204,14 @@ class CinderHelm(openstack.OpenstackBaseHelm): break cinder_overrides['DEFAULT']['backup_driver'] = self.default_backup_driver + backup_replicas = self._num_provisioned_controllers() + if self.default_backup_type in [app_constants.NETAPP_ISCSI_BACKEND_NAME, app_constants.NETAPP_FC_BACKEND_NAME]: + # Trident doesn't support multiple replicas when deployed using + # storage backends because RWX volumes cannot be created + # using "ontap-san" (iSCSI/FC) [1] provisioned through K8S PVCs. + # [1] https://docs.netapp.com/us-en/trident/trident-use/ontap-san.html + backup_replicas = 1 + overrides = { common.HELM_NS_OPENSTACK: { 'pod': { @@ -230,7 +238,7 @@ class CinderHelm(openstack.OpenstackBaseHelm): 'api': self._num_provisioned_controllers(), 'volume': self._num_provisioned_controllers(), 'scheduler': self._num_provisioned_controllers(), - 'backup': self._num_provisioned_controllers() + 'backup': backup_replicas }, 'security_context': { 'cinder_volume': {