From a2df5a913552f3b7aafc7cc067296a4593356166 Mon Sep 17 00:00:00 2001 From: gais-ameer-rh Date: Fri, 15 May 2026 15:42:18 +0530 Subject: [PATCH 1/2] [ci-dcn-site] Add cinderBackups per-AZ configuration to service-values template spec.cinder.template.cinderBackup (singluar) in DCN DT is replaced with cinderBackups (plural) to deploy multiple cinder backups per edge sites Add cinderBackups block to roles/ci_dcn_site/templates/service-values.yaml.j2 to enable per-AZ Ceph backup configuration on the OpenStackControlPlane CR. The block iterates over all active Ceph AZs, skipping any scaled-down site. Set cinderBackup.replicas to 0 in service-values.yaml.j2 as cinderBackup is deprecated Invoke hooks/playbooks/cinder_backups.yaml playbook to validates the behaviour of cinderBackups in DCN scenario. The playbook tests different scenarios of cinder backup creation and restoring the backups across availability zones. Jira: OSPRH-28343 Signed-off-by: Gais Ameer Co-Authored-By: Claude Sonnet 4.5 --- hooks/playbooks/cinder_backups.yaml | 2 +- playbooks/dcn.yml | 9 ++++++++ .../templates/service-values.yaml.j2 | 23 +++++++++++++++---- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/hooks/playbooks/cinder_backups.yaml b/hooks/playbooks/cinder_backups.yaml index 74dbe00b7..ec8cd7c7f 100644 --- a/hooks/playbooks/cinder_backups.yaml +++ b/hooks/playbooks/cinder_backups.yaml @@ -195,4 +195,4 @@ openstackclient openstack volume show vol-az1-backup-az2-restore-az2 -f value -c availability_zone register: vol_az1_backup_az2_restore_az2_zone - failed_when: "'az2' not in vol_az1_backup_az2_restore_az2_zone.stdout" + failed_when: "'az2' not in vol_az1_backup_az2_restore_az2_zone.stdout" \ No newline at end of file diff --git a/playbooks/dcn.yml b/playbooks/dcn.yml index 853d08836..b11ef46e5 100644 --- a/playbooks/dcn.yml +++ b/playbooks/dcn.yml @@ -64,6 +64,15 @@ ansible.builtin.include_role: name: ci_dcn_site + - name: Verify cinder backups across AZs + when: dcn_test_cinder_backups | default('true') + cifmw.general.ci_script: + output_dir: "{{ cifmw_basedir }}/artifacts" + extra_args: + ANSIBLE_LOG_PATH: "{{ cifmw_basedir }}/logs/cinder_backups_test.log" + script: | + ansible-playbook -i {{ inventory_file }} {{ playbook_dir }}/../hooks/playbooks/cinder_backups.yaml + - name: The map for az0 contains all AZ backends ansible.builtin.set_fact: az_to_group_map: diff --git a/roles/ci_dcn_site/templates/service-values.yaml.j2 b/roles/ci_dcn_site/templates/service-values.yaml.j2 index 7cc750d2c..87ff4d660 100644 --- a/roles/ci_dcn_site/templates/service-values.yaml.j2 +++ b/roles/ci_dcn_site/templates/service-values.yaml.j2 @@ -15,13 +15,26 @@ data: cinderAPI: replicas: 3 cinderBackup: - replicas: 3 + replicas: 0 customServiceConfig: | [DEFAULT] - backup_driver = cinder.backup.drivers.ceph.CephBackupDriver - backup_ceph_conf = /etc/ceph/az0.conf - backup_ceph_pool = backups - backup_ceph_user = openstack + # Not implemented in this example + cinderBackups: +{% for _ceph in _ceph_vars_list %} +{% if _ceph.cifmw_ceph_client_cluster != _az_to_scaledown %} + {{ _ceph.cifmw_ceph_client_cluster }}: + customServiceConfig: | + [DEFAULT] + storage_availability_zone = {{ _ceph.cifmw_ceph_client_cluster }} + backup_driver = cinder.backup.drivers.ceph.CephBackupDriver + backup_ceph_conf = /etc/ceph/{{ _ceph.cifmw_ceph_client_cluster }}.conf + backup_ceph_pool = backups + backup_ceph_user = openstack + networkAttachments: + - storage + replicas: 1 +{% endif %} +{% endfor %} cinderVolumes: {% for _ceph in _ceph_vars_list %} {% if _ceph.cifmw_ceph_client_cluster != _az_to_scaledown %} From 3519b21142e84273b15814eaf5dae081eff8b3a5 Mon Sep 17 00:00:00 2001 From: gais-ameer-rh Date: Tue, 9 Jun 2026 14:24:12 +0530 Subject: [PATCH 2/2] [ci-dcn-site][Patch] Add cinderBackups per-AZ configuration to service-values template spec.cinder.template.cinderBackup (singluar) in DCN DT is replaced with cinderBackups (plural) to deploy multiple cinder backups per edge sites Add cinderBackups block to roles/ci_dcn_site/templates/service-values.yaml.j2 to enable per-AZ Ceph backup configuration on the OpenStackControlPlane CR. The block iterates over all active Ceph AZs, skipping any scaled-down site. Set cinderBackup.replicas to 0 in service-values.yaml.j2 as cinderBackup is deprecated Invoke hooks/playbooks/cinder_backups.yaml playbook to validates the behaviour of cinderBackups in DCN scenario. The playbook tests different scenarios of cinder backup creation and restoring the backups across availability zones. Jira: OSPRH-28343 Signed-off-by: Gais Ameer Co-Authored-By: Claude Sonnet 4.5 --- hooks/playbooks/cinder_backups.yaml | 2 +- playbooks/dcn.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hooks/playbooks/cinder_backups.yaml b/hooks/playbooks/cinder_backups.yaml index ec8cd7c7f..74dbe00b7 100644 --- a/hooks/playbooks/cinder_backups.yaml +++ b/hooks/playbooks/cinder_backups.yaml @@ -195,4 +195,4 @@ openstackclient openstack volume show vol-az1-backup-az2-restore-az2 -f value -c availability_zone register: vol_az1_backup_az2_restore_az2_zone - failed_when: "'az2' not in vol_az1_backup_az2_restore_az2_zone.stdout" \ No newline at end of file + failed_when: "'az2' not in vol_az1_backup_az2_restore_az2_zone.stdout" diff --git a/playbooks/dcn.yml b/playbooks/dcn.yml index b11ef46e5..be74b5e06 100644 --- a/playbooks/dcn.yml +++ b/playbooks/dcn.yml @@ -71,7 +71,7 @@ extra_args: ANSIBLE_LOG_PATH: "{{ cifmw_basedir }}/logs/cinder_backups_test.log" script: | - ansible-playbook -i {{ inventory_file }} {{ playbook_dir }}/../hooks/playbooks/cinder_backups.yaml + ansible-playbook -i {{ inventory_file }} {{ cifmw_repo }}/hooks/playbooks/cinder_backups.yaml - name: The map for az0 contains all AZ backends ansible.builtin.set_fact: