diff --git a/playbooks/inventory/group_vars/all.yml b/playbooks/inventory/group_vars/all.yml index 0d7a308816..269a59a62e 100644 --- a/playbooks/inventory/group_vars/all.yml +++ b/playbooks/inventory/group_vars/all.yml @@ -117,6 +117,8 @@ ceilometer_rabbitmq_host_group: "rabbitmq_all" ceilometer_rabbitmq_port: "{{ rabbitmq_port }}" ## Cinder +# If there are Swift hosts in the environment, then enable cinder backups to it +cinder_service_backup_program_enabled: "{{ groups['swift_all'] is defined and groups['swift_all'] | length > 0 }}" # cinder_backend_rbd_inuse: True if current host has an rbd backend cinder_backend_rbd_inuse: '{{ (cinder_backends|default("")|to_json).find("cinder.volume.drivers.rbd.RBDDriver") != -1 }}' # cinder_backends_rbd_inuse: true if at least 1 cinder_backend on any diff --git a/playbooks/inventory/group_vars/utility_all.yml b/playbooks/inventory/group_vars/utility_all.yml index f88c5b0b5b..9716eae532 100644 --- a/playbooks/inventory/group_vars/utility_all.yml +++ b/playbooks/inventory/group_vars/utility_all.yml @@ -21,6 +21,9 @@ tempest_log_dir: /var/log/utility galera_client_drop_config_file: true +# If cinder has a backup service enabled, make sure that Tempest tests it +tempest_volume_backup_enabled: "{{ cinder_service_backup_program_enabled | bool }}" + # Ensure that the package state matches the global setting utility_package_state: "{{ package_state }}" diff --git a/releasenotes/notes/detect-cinder-backup-service-7dc68f532741be87.yaml b/releasenotes/notes/detect-cinder-backup-service-7dc68f532741be87.yaml new file mode 100644 index 0000000000..107cb83d62 --- /dev/null +++ b/releasenotes/notes/detect-cinder-backup-service-7dc68f532741be87.yaml @@ -0,0 +1,13 @@ +--- +features: + - If there are swift hosts in the environment, then the value for + ``cinder_service_backup_program_enabled`` will automatically be + set to ``True``. This negates the need to set this variable in + ``user_variables.yml``, but the value may still be overridden at + the deployer discretion. +upgrade: + - If there are swift hosts in the environment, then the value for + ``cinder_service_backup_program_enabled`` will automatically be + set to ``True``. This negates the need to set this variable in + ``user_variables.yml``, but the value may still be overridden at + the deployer discretion. diff --git a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 index 21f0aa5ee4..18d892d480 100644 --- a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 @@ -16,15 +16,11 @@ ## General options debug: True -## Cinder settings -cinder_service_backup_program_enabled: True - ## Tempest settings tempest_service_available_ceilometer: True tempest_service_available_aodh: True tempest_public_subnet_cidr: 172.29.248.0/22 tempest_public_subnet_allocation_pools: "172.29.249.110-172.29.249.200" -tempest_volume_backup_enabled: True ## Galera settings galera_innodb_buffer_pool_size: 512M