Clean up role tests

Now that we're using the general templates, we can slim down
the role test definitions. We can also remove tests which are
not being watched, or which are fundamentally broken. With
this we can also remove unused scripts/plays.

We do the following:

1. We remove the 'upgrade' job, given that it's been broken
   all cycle due to the way the job executes and we need to
   regroup to figure out another way to do it. The associated
   scripts are also removed.
2. We remove the 'pypy' tox target. The job was removed some
   time ago, but the tox target left behind. The associated
   inventory is also removed.
3. We remove the 'multireg' jobs. The jobs have been failing
   for some time and are very complex. If multi-region tests
   are re-implemented, they should be done in a simpler way -
   probably best using multiple nodes, rather than trying to
   fudge it on a single host with containers. The associated
   scripts and inventory items are also removed.
4. We rename the 'func_swift3' tox target to 'swift3', and
   reconfigure the job appropriately. The verbose logging for
   ansible is also removed, given that we have ARA to provide
   decent diagnostic output.

Change-Id: I411fcaac9a1ddf17996d771f13b2de7e775e4a60
This commit is contained in:
Jesse Pretorius 2018-09-09 11:31:11 +01:00
parent 74acffff2d
commit 386cdb51e2
23 changed files with 7 additions and 971 deletions

View File

@ -1,21 +0,0 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- import_playbook: test-swift-resources-upgrade.yml
- import_playbook: common/test-install-swift.yml
- import_playbook: test-swift-resources-results.yml

View File

@ -1,26 +0,0 @@
---
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_host: 10.1.1.101
container_networks:
management_address:
address: "{{ ansible_host }}"
bridge: "br-mgmtA"
interface: "eth1"
netmask: "255.255.255.0"
type: "veth"
static_routes:
- cidr: "10.1.11.0/24"
gateway: "10.1.1.1"

View File

@ -1,36 +0,0 @@
---
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_host: 10.1.1.102
storage_address: 10.1.2.102
container_networks:
management_address:
address: "{{ ansible_host }}"
bridge: "br-mgmtA"
interface: "eth1"
netmask: "255.255.255.0"
type: "veth"
static_routes:
- cidr: "10.1.11.0/24"
gateway: "10.1.1.1"
storage_address:
address: "{{ storage_address }}"
bridge: "br-storageA"
interface: "eth2"
netmask: "255.255.255.0"
type: "veth"
static_routes:
- cidr: "10.1.12.0/24"
gateway: "10.1.2.1"

View File

@ -1,36 +0,0 @@
---
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_host: 10.1.11.102
storage_address: 10.1.12.102
container_networks:
management_address:
address: "{{ ansible_host }}"
bridge: "br-mgmtB"
interface: "eth1"
netmask: "255.255.255.0"
type: "veth"
static_routes:
- cidr: "10.1.1.0/24"
gateway: "10.1.11.1"
storage_address:
address: "{{ storage_address }}"
bridge: "br-storageB"
interface: "eth2"
netmask: "255.255.255.0"
type: "veth"
static_routes:
- cidr: "10.1.2.0/24"
gateway: "10.1.12.1"

View File

@ -1,37 +0,0 @@
---
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_host: 10.1.1.103
storage_address: 10.1.2.103
replication_address: 10.1.2.103
container_networks:
management_address:
address: "{{ ansible_host }}"
bridge: "br-mgmtA"
interface: "eth1"
netmask: "255.255.255.0"
type: "veth"
static_routes:
- cidr: "10.1.11.0/24"
gateway: "10.1.1.1"
storage_address:
address: "{{ storage_address }}"
bridge: "br-storageA"
interface: "eth2"
netmask: "255.255.255.0"
type: "veth"
static_routes:
- cidr: "10.1.12.0/24"
gateway: "10.1.2.1"

View File

@ -1,37 +0,0 @@
---
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_host: 10.1.1.104
storage_address: 10.1.2.104
replication_address: 10.1.2.104
container_networks:
management_address:
address: "{{ ansible_host }}"
bridge: "br-mgmtA"
interface: "eth1"
netmask: "255.255.255.0"
type: "veth"
static_routes:
- cidr: "10.1.11.0/24"
gateway: "10.1.1.1"
storage_address:
address: "{{ storage_address }}"
bridge: "br-storageA"
interface: "eth2"
netmask: "255.255.255.0"
type: "veth"
static_routes:
- cidr: "10.1.12.0/24"
gateway: "10.1.2.1"

View File

@ -1,37 +0,0 @@
---
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_host: 10.1.11.103
storage_address: 10.1.12.103
replication_address: 10.1.12.103
container_networks:
management_address:
address: "{{ ansible_host }}"
bridge: "br-mgmtB"
interface: "eth1"
netmask: "255.255.255.0"
type: "veth"
static_routes:
- cidr: "10.1.1.0/24"
gateway: "10.1.11.1"
storage_address:
address: "{{ storage_address }}"
bridge: "br-storageB"
interface: "eth2"
netmask: "255.255.255.0"
type: "veth"
static_routes:
- cidr: "10.1.2.0/24"
gateway: "10.1.12.1"

View File

@ -1,37 +0,0 @@
---
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ansible_host: 10.1.11.104
storage_address: 10.1.12.104
replication_address: 10.1.12.104
container_networks:
management_address:
address: "{{ ansible_host }}"
bridge: "br-mgmtB"
interface: "eth1"
netmask: "255.255.255.0"
type: "veth"
static_routes:
- cidr: "10.1.1.0/24"
gateway: "10.1.11.1"
storage_address:
address: "{{ storage_address }}"
bridge: "br-storageB"
interface: "eth2"
netmask: "255.255.255.0"
type: "veth"
static_routes:
- cidr: "10.1.2.0/24"
gateway: "10.1.12.1"

View File

@ -1,67 +0,0 @@
[all]
localhost
infraMR
swift-proxyA
swift-storageA1
swift-storageA2
[all_containers]
infraMR
swift-proxyA
swift-storageA1
swift-storageA2
swift-proxyB
swift-storageB1
swift-storageB2
[galera_all]
infraMR
[memcached_all]
infraMR
[oslomsg_rpc_all]
infraMR
[oslomsg_notify_all]
infraMR
[rabbitmq_all]
infraMR
[service_all:children]
galera_all
memcached_all
[keystone_all]
infraMR
[swift_hosts]
swift-storageA1
swift-storageA2
[swift_proxy]
swift-proxyA
[swift_acc]
swift-storageA1
swift-storageA2
[swift_cont]
swift-storageA1
swift-storageA2
[swift_obj]
swift-storageA1
swift-storageA2
[swift_all:children]
swift_acc
swift_proxy
swift_cont
swift_obj
[swift_remote_all]
swift-proxyB
swift-storageB1
swift-storageB2

View File

@ -1,64 +0,0 @@
[all]
localhost
infraMR
swift-proxyB
swift-storageB1
swift-storageB2
[all_containers]
infraMR
swift-proxyB
swift-storageB1
swift-storageB2
[galera_all]
infraMR
[memcached_all]
infraMR
[oslomsg_rpc_all]
infraMR
[oslomsg_notify_all]
infraMR
[rabbitmq_all]
infraMR
[service_all:children]
galera_all
memcached_all
[keystone_all]
infraMR
[swift_hosts]
swift-storageB1
swift-storageB2
[swift_proxy]
swift-proxyB
[swift_acc]
swift-storageB1
swift-storageB2
[swift_cont]
swift-storageB1
swift-storageB2
[swift_obj]
swift-storageB1
swift-storageB2
[swift_all:children]
swift_acc
swift_proxy
swift_cont
swift_obj
[swift_remote_all]
swift-proxyA
swift-storageA1
swift-storageA2

View File

@ -1,43 +0,0 @@
[all]
localhost
swift-proxy
swift-storage1
swift-storage2
[all_containers]
swift-proxy
swift-storage1
swift-storage2
[memcached_all]
swift-proxy
[service_all:children]
memcached_all
[swift_hosts]
swift-storage1
swift-storage2
[swift_proxy]
swift-proxy
[swift_acc]
swift-storage1
swift-storage2
[swift_cont]
swift-storage1
swift-storage2
[swift_obj]
swift-storage1
swift-storage2
[swift_all:children]
swift_acc
swift_proxy
swift_cont
swift_obj
[swift_remote_all]

View File

@ -1,31 +0,0 @@
---
# Copyright 2015, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Only MR-A needs the bridges as it does the host setup
bridges:
- name: "br-mgmtA"
ip_addr: "10.1.1.1"
- name: "br-storageA"
ip_addr: "10.1.2.1"
- name: "br-mgmtB"
ip_addr: "10.1.11.1"
- name: "br-storageB"
ip_addr: "10.1.12.1"
test_swift_region: 1
test_swift_repl_network: "eth2"
swift_pretend_min_part_hours_passed: True
swift_package_state: present

View File

@ -1,20 +0,0 @@
---
# Copyright 2015, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
test_swift_region: 2
test_swift_repl_network: "eth2"
swift_pretend_min_part_hours_passed: True
swift_package_state: present

View File

@ -1,63 +0,0 @@
---
# Copyright 2015, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
bridges:
- name: "br-mgmt"
ip_addr: "10.1.1.1"
- name: "br-storage"
ip_addr: "10.1.2.1"
- name: "br-repl"
ip_addr: "10.1.3.1"
# These values are quite low due to memory constraints in an AIO
swift_pypy_gc_min: "5M"
swift_pypy_gc_max: "200M"
swift_pypy_enabled: True
swift_middleware_list:
- catch_errors
- gatekeeper
- healthcheck
- proxy-logging
- "{% if swift_ceilometer_enabled | bool %}ceilometer{% endif %}"
- cache
- container_sync
- bulk
- tempurl
- ratelimit
- tempauth
- staticweb
- container-quotas
- account-quotas
- slo
- dlo
- proxy-logging
- proxy-server
swift_tempauth_users:
- "user_admin_admin = admin .admin .reseller_admin"
- "user_test1_test1 = test1 .admin"
- "user_test2_test2 = test2 .admin"
- "user_test1_test3 = test3"
- "user_test5_test5 = test5 service"
- "user_test6_test6 = test6 .reseller_admin"
swift_hard_open_file_limits: 30720
swift_soft_open_file_limits: 12288
swift_rsync_module_per_drive: True
test_swift_repl_number: 2
swift_package_state: present

View File

@ -1,27 +0,0 @@
---
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Ensure the repo is setup for previous version
- import_playbook: common/previous/test-repo-setup.yml
- name: Playbook for deploying swift
hosts: "{{ swift_groups | default('swift_all:swift_remote_all') }}"
user: root
become: true
gather_facts: true
roles:
- role: "os_previous_swift"
vars_files:
- common/previous/test-vars.yml

View File

@ -1,115 +0,0 @@
#!/usr/bin/env bash
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# WARNING:
# This file is use by all OpenStack-Ansible roles for testing purposes.
# Any changes here will affect all OpenStack-Ansible role repositories
# with immediate effect.
# PURPOSE:
# This script executes a test Ansible playbook for the purpose of
# functionally testing the role. It supports a convergence test,
# check mode and an idempotence test.
## Shell Opts ----------------------------------------------------------------
set -e
## Vars ----------------------------------------------------------------------
export WORKING_DIR=${WORKING_DIR:-$(pwd)}
export ROLE_NAME=${ROLE_NAME:-''}
export COMMON_TESTS_PATH="${WORKING_DIR}/tests/common"
## Functions -----------------------------------------------------------------
function execute_ansible_playbook {
export ANSIBLE_CLI_PARAMETERS="${ANSIBLE_PARAMETERS} -e @${ANSIBLE_OVERRIDES}"
CMD_TO_EXECUTE="ansible-playbook ${TEST_PLAYBOOK} $@ ${ANSIBLE_CLI_PARAMETERS}"
echo "Executing: ${CMD_TO_EXECUTE}"
echo "With:"
echo " ANSIBLE_INVENTORY: ${ANSIBLE_INVENTORY}"
echo " ANSIBLE_LOG_PATH: ${ANSIBLE_LOG_PATH}"
${CMD_TO_EXECUTE}
}
function gate_job_exit_tasks {
source "${COMMON_TESTS_PATH}/test-log-collect.sh"
}
## Main ----------------------------------------------------------------------
# Ensure that the Ansible environment is properly prepared
source "${COMMON_TESTS_PATH}/test-ansible-env-prep.sh"
# Set gate job exit traps, this is run regardless of exit state when the job finishes.
trap gate_job_exit_tasks EXIT
# Prepare environment for the setup of Region A
# NB we run against swift_all only since region B hosts don't exist yet.
export ANSIBLE_INVENTORY="${WORKING_DIR}/tests/inventory_MR_A"
export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute-install-MR_A.log"
export ANSIBLE_OVERRIDES="${WORKING_DIR}/tests/${ROLE_NAME}-overrides-MR-A.yml"
export ANSIBLE_PARAMETERS="-vvv -e swift_do_setup=True -e swift_do_sync=False -e swift_groups=swift_all"
export TEST_PLAYBOOK="${WORKING_DIR}/tests/test.yml"
# Execute the setup of Region A
execute_ansible_playbook
# Prepare environment for the setup of Region B
export ANSIBLE_INVENTORY="${WORKING_DIR}/tests/inventory_MR_B"
export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute-install-MR_B.log"
export ANSIBLE_OVERRIDES="${WORKING_DIR}/tests/${ROLE_NAME}-overrides-MR-B.yml"
export ANSIBLE_PARAMETERS="-vvv"
export TEST_PLAYBOOK="${COMMON_TESTS_PATH}/test-install-swift.yml"
# Execute the setup of Region B
execute_ansible_playbook
# Prepare the environment for synchronising the rings from Region A
export ANSIBLE_INVENTORY="${WORKING_DIR}/tests/inventory_MR_A"
export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute-sync-MR_A.log"
export ANSIBLE_OVERRIDES="${WORKING_DIR}/tests/${ROLE_NAME}-overrides-MR-A.yml"
export ANSIBLE_PARAMETERS="-vvv -e swift_do_setup=False -e swift_do_sync=True"
export TEST_PLAYBOOK="${COMMON_TESTS_PATH}/test-install-swift.yml"
# Synchronise the rings from Region A
execute_ansible_playbook
# Prepare the environment for functionally testing Region A
export ANSIBLE_INVENTORY="${WORKING_DIR}/tests/inventory_MR_A"
export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute-test-MR_A.log"
export ANSIBLE_OVERRIDES="${WORKING_DIR}/tests/${ROLE_NAME}-overrides-MR-A.yml"
export ANSIBLE_PARAMETERS="-vvv"
export TEST_PLAYBOOK="${WORKING_DIR}/tests/test-swift-functional.yml"
# Functionally test Region A
execute_ansible_playbook
# Prepare the environment for functionally testing Region B
export ANSIBLE_INVENTORY="${WORKING_DIR}/tests/inventory_MR_B"
export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute-test-MR_B.log"
export ANSIBLE_OVERRIDES="${WORKING_DIR}/tests/${ROLE_NAME}-overrides-MR-B.yml"
export ANSIBLE_PARAMETERS="-vvv"
export TEST_PLAYBOOK="${WORKING_DIR}/tests/test-swift-functional.yml"
# Functionally test Region B
execute_ansible_playbook

View File

@ -1,30 +0,0 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Playbook to report resource tests
hosts: localhost
become: yes
gather_facts: no
tasks:
- name: Kill resource test
command: pkill -f rolling_test
ignore_errors: yes
- name: Register upgrade benchmarking results
async_status: jid={{ rolling_test_benchmark.ansible_job_id }}
register: rolling_test_benchmark_results
until: rolling_test_benchmark_results.finished
- name: Display basic summary
debug:
msg: "Finished upgrade with {{ rolling_test_benchmark_results.stdout }}% API response failure rate"

View File

@ -1,59 +0,0 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Playbook to run resource tests against an openstack service
hosts: localhost
become: yes
# TODO: remove the static reference to openstack1
vars:
test_keystone_host: openstack1
working_dir: "{{ lookup('env', 'WORKING_DIR') }}"
upgrade_venv_folder: "/openstack/venvs/upgrades"
upgrade_test_packages:
- "python-keystoneclient"
- "python-glanceclient"
- "openstacksdk"
vars_files:
- common/test-vars.yml
tasks:
- name: Generate clouds.yaml for API testing
include_role:
name: "openstack_openrc"
- name: Install openstack sdk
pip:
name: "{{ upgrade_test_packages }}"
virtualenv: "{{ upgrade_venv_folder }}"
virtualenv_site_packages: "no"
extra_args: >-
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }}
{{ pip_install_options | default('') }}
register: install_packages
until: install_packages is success
retries: 5
delay: 2
- name: Run rolling test script
shell: |
source {{ upgrade_venv_folder }}/bin/activate
./openstack-ansible-ops/bowling_ball/rolling_tests.py swift
args:
chdir: "{{ working_dir }}"
executable: /bin/bash
async: 100000
poll: 0
environment:
OS_AUTH_URL: "{{ keystone_service_publicurl }}"
OS_PASSWORD: "{{ keystone_auth_admin_password }}"
register: rolling_test_benchmark

View File

@ -1,109 +0,0 @@
#!/usr/bin/env bash
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# WARNING:
# This file is use by all OpenStack-Ansible roles for testing purposes.
# Any changes here will affect all OpenStack-Ansible role repositories
# with immediate effect.
# PURPOSE:
# This script executes test Ansible playbooks required for performing
# an upgrade test of the os_neutron role.
# Due to the way Ansible caches and handles modules, we need to run
# separate Ansible runs to ensure the "upgrade" uses the new
# "neutron_migrations_facts" module, instead of the cached version
# used when deploying the previous Neutron version.
## Shell Opts ----------------------------------------------------------------
set -e
## Vars ----------------------------------------------------------------------
export WORKING_DIR=${WORKING_DIR:-$(pwd)}
export ROLE_NAME=${ROLE_NAME:-''}
export ANSIBLE_PARAMETERS=${ANSIBLE_PARAMETERS:-""}
export TEST_PLAYBOOK=$WORKING_DIR/tests/test-upgrade.yml
export TEST_CHECK_MODE=${TEST_CHECK_MODE:-false}
export TEST_IDEMPOTENCE=${TEST_IDEMPOTENCE:-false}
export ANSIBLE_OVERRIDES=$WORKING_DIR/tests/os_swift-overrides.yml
export COMMON_TESTS_PATH="${WORKING_DIR}/tests/common"
echo "ANSIBLE_OVERRIDES: ${ANSIBLE_OVERRIDES}"
echo "ANSIBLE_PARAMETERS: ${ANSIBLE_PARAMETERS}"
echo "TEST_PLAYBOOK: ${TEST_PLAYBOOK}"
echo "TEST_CHECK_MODE: ${TEST_CHECK_MODE}"
echo "TEST_IDEMPOTENCE: ${TEST_IDEMPOTENCE}"
## Functions -----------------------------------------------------------------
function execute_ansible_playbook {
export ANSIBLE_CLI_PARAMETERS="${ANSIBLE_PARAMETERS} -e @${ANSIBLE_OVERRIDES}"
export ANSIBLE_BIN=${ANSIBLE_BIN:-"ansible-playbook"}
CMD_TO_EXECUTE="${ANSIBLE_BIN} ${TEST_PLAYBOOK} $@ ${ANSIBLE_CLI_PARAMETERS}"
echo "Executing: ${CMD_TO_EXECUTE}"
echo "With:"
echo " ANSIBLE_INVENTORY: ${ANSIBLE_INVENTORY}"
echo " ANSIBLE_LOG_PATH: ${ANSIBLE_LOG_PATH}"
${CMD_TO_EXECUTE}
}
## Main ----------------------------------------------------------------------
# Ensure that the Ansible environment is properly prepared
source "${COMMON_TESTS_PATH}/test-ansible-env-prep.sh"
# Prepare environment for the initial deploy of (previous and current) Swift
# No upgrading or testing is done yet.
export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute-swift-install.log"
# Execute the setup of current infrastructure
execute_ansible_playbook
# Prepare environment for the deploy of previous Nova:
# No upgrading or testing is done yet.
export TEST_PLAYBOOK="${WORKING_DIR}/tests/test-install-previous-swift.yml"
export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute-previous_swift-install.log"
export PREVIOUS_VENV="ansible-previous"
export ANSIBLE_BIN="${WORKING_DIR}/.tox/${PREVIOUS_VENV}/bin/ansible-playbook"
source ${COMMON_TESTS_PATH}/test-create-previous-venv.sh
# Execute the setup of previous Neutron
execute_ansible_playbook
# Unset previous branch overrides
unset PREVIOUS_VENV
unset ANSIBLE_BIN
# Prepare environment for the upgrade of Swift
export TEST_PLAYBOOK="${WORKING_DIR}/tests/benchmark-upgrade.yml"
export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute-swift-upgrade.log"
# Excute the upgrade of Neutron
execute_ansible_playbook
# Prepare the environment for the testing of upgraded Swift
export TEST_PLAYBOOK="${WORKING_DIR}/tests/test-swift-functional.yml"
export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute-swift-upgrade-test.log"
# Execute testing of upgraded Neutron
execute_ansible_playbook

View File

@ -1,26 +0,0 @@
---
# Copyright 2015, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Setup the keys, host and containers
- import_playbook: common/test-setup-host.yml
# Install Memcached/Galera/Rabbitmq
- import_playbook: common/test-install-infra.yml
# Install Keystone
- import_playbook: common/test-install-keystone.yml
# Setup Swift-hosts
- import_playbook: common/test-setup-swifthosts.yml

28
tox.ini
View File

@ -93,6 +93,7 @@ commands =
commands =
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:distro_install]
setenv =
{[testenv]setenv}
@ -103,37 +104,16 @@ setenv =
commands =
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:upgrade]
[testenv:swift3]
setenv =
{[testenv]setenv}
CLONE_UPGRADE_TESTS=yes
commands =
bash -c "{toxinidir}/tests/test-swift-upgrades.sh"
[testenv:func_pypy]
setenv =
{[testenv]setenv}
ANSIBLE_INVENTORY={toxinidir}/tests/inventory_pypy
ANSIBLE_OVERRIDES={toxinidir}/tests/os_swift-overrides-pypy.yml
commands =
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:func_swift3]
setenv =
{[testenv]setenv}
ANSIBLE_PARAMETERS=-vvv -e swift_swift3_enabled=True
ANSIBLE_PARAMETERS=-e swift_swift3_enabled=True
TEST_PLAYBOOK={toxinidir}/tests/test.yml {toxinidir}/tests/test-swift-functional.yml {toxinidir}/tests/test-swift3-functional.yml
commands =
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:multi_reg]
commands =
bash -c "{toxinidir}/tests/test-swift-multi_reg.sh"
[testenv:linters]
commands =
bash -c "{toxinidir}/tests/common/test-ansible-env-prep.sh"

View File

@ -14,22 +14,8 @@
# limitations under the License.
- job:
name: openstack-ansible-multireg-ubuntu-xenial
name: openstack-ansible-swift3-ubuntu-xenial
parent: openstack-ansible-functional-ubuntu-xenial
vars:
tox_env: multi_reg
- job:
name: openstack-ansible-multireg-centos-7-nv
parent: openstack-ansible-functional-centos-7
voting: false
vars:
tox_env: multi_reg
- job:
name: openstack-ansible-swift3-ubuntu-xenial-nv
parent: openstack-ansible-functional-ubuntu-xenial
voting: false
vars:
tox_env: func_swift3
tox_env: swift3

View File

@ -20,13 +20,8 @@
- release-notes-jobs-python3
check:
jobs:
- openstack-ansible-upgrade-ubuntu-xenial
# TODO(odyssey4me): Revert this once the multi-region
# tests are fixed.
- openstack-ansible-multireg-ubuntu-xenial:
- openstack-ansible-swift3-ubuntu-xenial:
voting: false
- openstack-ansible-multireg-centos-7-nv
- openstack-ansible-swift3-ubuntu-xenial-nv
- openstack-ansible-functional-distro_install-ubuntu-xenial
# NOTE(hwoarang) Centos7 is having some troubles with repo dependencies
# so disabling until it's investigated.
@ -35,9 +30,5 @@
- openstack-ansible-functional-distro_install-opensuse-423
gate:
jobs:
- openstack-ansible-upgrade-ubuntu-xenial
# TODO(odyssey4me): Revert this once the multi-region
# tests are fixed.
#- openstack-ansible-multireg-ubuntu-xenial
- openstack-ansible-functional-distro_install-ubuntu-xenial
- openstack-ansible-functional-distro_install-opensuse-423