Skip to content

Commit 21dbd39

Browse files
gais-ameerclaude
authored andcommitted
[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 as required. 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 <gameer@redhat.com> Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 44c0639 commit 21dbd39

2 files changed

Lines changed: 29 additions & 5 deletions

File tree

playbooks/dcn.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@
6464
ansible.builtin.include_role:
6565
name: ci_dcn_site
6666

67+
- name: Verify cinder backups across AZs
68+
when: cifmw_dcn_test_cinder_backups | default(true) | bool
69+
cifmw.general.ci_script:
70+
output_dir: "{{ cifmw_basedir }}/artifacts"
71+
extra_args:
72+
ANSIBLE_LOG_PATH: "{{ cifmw_basedir }}/logs/cinder_backups_test.log"
73+
script: |
74+
ansible-playbook -i {{ inventory_file }} {{ cifmw_repo }}/hooks/playbooks/cinder_backups.yaml
75+
6776
- name: The map for az0 contains all AZ backends
6877
ansible.builtin.set_fact:
6978
az_to_group_map:

roles/ci_dcn_site/templates/service-values.yaml.j2

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,28 @@ data:
1515
cinderAPI:
1616
replicas: 3
1717
cinderBackup:
18-
replicas: 3
18+
replicas: 0
1919
customServiceConfig: |
2020
[DEFAULT]
21-
backup_driver = cinder.backup.drivers.ceph.CephBackupDriver
22-
backup_ceph_conf = /etc/ceph/az0.conf
23-
backup_ceph_pool = backups
24-
backup_ceph_user = openstack
21+
# cinderBackup (singular) is deprecated; use cinderBackups (plural)
22+
cinderBackups:
23+
{% for _ceph in _ceph_vars_list %}
24+
{{ _ceph.cifmw_ceph_client_cluster }}:
25+
customServiceConfig: |
26+
[DEFAULT]
27+
storage_availability_zone = {{ _ceph.cifmw_ceph_client_cluster }}
28+
backup_driver = cinder.backup.drivers.ceph.CephBackupDriver
29+
backup_ceph_conf = /etc/ceph/{{ _ceph.cifmw_ceph_client_cluster }}.conf
30+
backup_ceph_pool = backups
31+
backup_ceph_user = openstack
32+
networkAttachments:
33+
- storage
34+
{% if _ceph.cifmw_ceph_client_cluster == _az_to_scaledown %}
35+
replicas: 0
36+
{% else %}
37+
replicas: 2
38+
{% endif %}
39+
{% endfor %}
2540
cinderVolumes:
2641
{% for _ceph in _ceph_vars_list %}
2742
{% if _ceph.cifmw_ceph_client_cluster != _az_to_scaledown %}

0 commit comments

Comments
 (0)