diff --git a/playbooks/dcn.yml b/playbooks/dcn.yml index 853d08836..be74b5e06 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 }} {{ cifmw_repo }}/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 %}