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 <joaopedro.barbozalioneza@windriver.com>
This commit is contained in:
jbarboza
2026-01-29 14:49:22 -03:00
committed by João Pedro Barboza Lioneza
parent 8488875c81
commit 8ffce7863f
@@ -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': {