From be0169ac5b94c3c24b80d3b2176e681df57da0f7 Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Wed, 29 Apr 2015 10:53:06 +0100 Subject: [PATCH] Update tempest and AIO to test cinder backups This commit allows tempest to be configured to test the cinder backup service. Additionally, we: - add a new function to openstack_tempest_gate.sh so we can include some cinder-backup-related API tests in our test list - update bootstrap-aio.sh to enable cinder backups and the ability to test cinder backups - update run-tempest.sh to include the cinder backup tests in the default test list Change-Id: I2b8b0255ef5fdf747bbc136c7b1152896161f8a0 Closes-Bug: #1449427 --- playbooks/roles/os_tempest/defaults/main.yml | 2 ++ .../roles/os_tempest/templates/openstack_tempest_gate.sh.j2 | 5 +++++ playbooks/roles/os_tempest/templates/tempest.conf.j2 | 2 +- scripts/bootstrap-aio.sh | 2 ++ scripts/run-tempest.sh | 2 +- 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/playbooks/roles/os_tempest/defaults/main.yml b/playbooks/roles/os_tempest/defaults/main.yml index 130ea77002..027af1f46a 100644 --- a/playbooks/roles/os_tempest/defaults/main.yml +++ b/playbooks/roles/os_tempest/defaults/main.yml @@ -58,6 +58,8 @@ tempest_boto_ec2_url: "http://{{ external_lb_vip_address }}:8773/services/Cloud" tempest_swift_enabled: false tempest_swift_object_versioning: True +tempest_volume_backup_enabled: False + tempest_git_repo: https://github.com/openstack/tempest tempest_git_install_branch: master tempest_git_dest: "/opt/tempest_{{ tempest_git_install_branch | replace('/', '_') }}" diff --git a/playbooks/roles/os_tempest/templates/openstack_tempest_gate.sh.j2 b/playbooks/roles/os_tempest/templates/openstack_tempest_gate.sh.j2 index 5f0570c8ce..d84c5d1119 100644 --- a/playbooks/roles/os_tempest/templates/openstack_tempest_gate.sh.j2 +++ b/playbooks/roles/os_tempest/templates/openstack_tempest_gate.sh.j2 @@ -62,6 +62,11 @@ function gen_test_list_heat_api() { egrep 'tempest\.api\.orchestration\.stacks\.test_non_empty_stack' } +# Run cinder backup api tests +function gen_test_list_cinder_backup() { + egrep 'tempest\.api\.volume\.admin\.test_volumes_backup' +} + # Run smoke tests function gen_test_list_smoke() { # this specific test fails frequently and is making our multi node nightly diff --git a/playbooks/roles/os_tempest/templates/tempest.conf.j2 b/playbooks/roles/os_tempest/templates/tempest.conf.j2 index 36a56eb5e5..a5cae17bed 100644 --- a/playbooks/roles/os_tempest/templates/tempest.conf.j2 +++ b/playbooks/roles/os_tempest/templates/tempest.conf.j2 @@ -230,7 +230,7 @@ volume_size = 1 api_extensions = all api_v1 = true api_v2 = false -backup = false +backup = {{ tempest_volume_backup_enabled }} multi_backend = false snapshot = false diff --git a/scripts/bootstrap-aio.sh b/scripts/bootstrap-aio.sh index f3e2e90203..6e89c686db 100755 --- a/scripts/bootstrap-aio.sh +++ b/scripts/bootstrap-aio.sh @@ -325,6 +325,8 @@ if [ "${DEPLOY_SWIFT}" == "yes" ]; then sed -i "s/glance_swift_store_key:.*/glance_swift_store_key: '{{ keystone_auth_admin_password }}'/" /etc/openstack_deploy/user_secrets.yml sed -i "s/glance_swift_store_region:.*/glance_swift_store_region: ${SERVICE_REGION}/" /etc/openstack_deploy/user_secrets.yml sed -i "s/glance_swift_store_user:.*/glance_swift_store_user: '{{ keystone_admin_user_name }}:{{ keystone_admin_tenant_name }}'/" /etc/openstack_deploy/user_secrets.yml + echo "cinder_service_backup_program_enabled: True" | tee -a /etc/openstack_deploy/user_variables.yml + echo "tempest_volume_backup_enabled: True" | tee -a /etc/openstack_deploy/user_variables.yml fi if [ ! -z "${RABBITMQ_PACKAGE_URL}" ]; then diff --git a/scripts/run-tempest.sh b/scripts/run-tempest.sh index 8e956f57a9..67dd11a564 100755 --- a/scripts/run-tempest.sh +++ b/scripts/run-tempest.sh @@ -22,7 +22,7 @@ export TEMPEST_SCRIPT_PATH=${TEMPEST_SCRIPT_PATH:-/opt/openstack_tempest_gate.sh ## TODO(someone) this needs to be changed back to the normal tests once someone ## is able to dig into tempest/the updated/deprecated config(s). This test should ## go back to being the scenario tests. -export TEMPEST_SCRIPT_PARAMETERS=${TEMPEST_SCRIPT_PARAMETERS:-"scenario heat_api"} +export TEMPEST_SCRIPT_PARAMETERS=${TEMPEST_SCRIPT_PARAMETERS:-"scenario heat_api cinder_backup"} export RUN_TEMPEST_OPTS=${RUN_TEMPEST_OPTS:-''} export TESTR_OPTS=${TESTR_OPTS:-''}