summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLuigi Toscano <ltoscano@redhat.com>2021-05-27 14:32:22 +0200
committerLuigi Toscano <ltoscano@redhat.com>2021-09-08 01:05:44 +0200
commit1c0c25babb3d9b13e271e37458cd55b974085901 (patch)
tree77c3a21e75bcdaefb5dc146d4c7bae3dda0596de /tools
parentd81a8386391c8e44055d0df34f48f3b6edf4edcb (diff)
downloadcinder-1c0c25babb3d9b13e271e37458cd55b974085901.tar.gz
Native multibackend-matrix Zuul v3 job
Port the legacy legacy-tempest-dsvm-multibackend-matrix job to the native Zuul v3 syntax, and rename it following the guidelines (cinder-multibackend-matrix-migration). This job tests the migration between two different backends specified through the volume.backend_names configuration key in tempest.conf. Now the job leverages the existing zuul code, namely the run-tempest role, which is called multiple times with all the possible combinations of the 3 tested backends (lvm, ceph, nfs) where the source and the destination differ. The final JUnitXML output summarizes the test results for each of the tested combinations. Change-Id: I34e7e48ee63c4c269f82ae178a7118ed402cad6d
Diffstat (limited to 'tools')
-rw-r--r--tools/hooks/README4
-rwxr-xr-xtools/hooks/run_multi_backend_matrix.sh94
-rwxr-xr-xtools/hooks/utils.sh10
3 files changed, 0 insertions, 108 deletions
diff --git a/tools/hooks/README b/tools/hooks/README
deleted file mode 100644
index edde18cb1..000000000
--- a/tools/hooks/README
+++ /dev/null
@@ -1,4 +0,0 @@
-These are hooks to be used by the OpenStack infra test system. These scripts
-may be called by certain jobs at important times to do extra testing, setup,
-etc. They are really only relevant within the scope of the OpenStack infra
-system and are not expected to be useful to anyone else. \ No newline at end of file
diff --git a/tools/hooks/run_multi_backend_matrix.sh b/tools/hooks/run_multi_backend_matrix.sh
deleted file mode 100755
index ad5b904a6..000000000
--- a/tools/hooks/run_multi_backend_matrix.sh
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) 2016, Hitachi, Erlon Cruz <erlon.cruz@fit-tecnologia.org.br>
-# All Rights Reserved.
-#
-# 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.
-
-set -x
-export TEMPEST_USER=${TEMPEST_USER:-tempest}
-chmod +w $BASE/new/tempest
-cd $BASE/new/tempest
-source $BASE/new/devstack/functions
-source $BASE/new/devstack/functions-common
-source $WORKSPACE/devstack-gate/functions.sh
-source $BASE/new/cinder/tools/hooks/utils.sh
-export TEMPEST_CONFIG=$BASE/new/tempest/etc/tempest.conf
-
-# Disable bash verbose so we have a cleaner output. Also, exit on error must
-# be disable as we will run several tests that can return error.
-set +x +e
-
-function configure_tempest_backends {
- be1=$1
- be2=$2
- echo "Configuring tempest conf in ${TEMPEST_CONFIG}"
- iniset -sudo $TEMPEST_CONFIG 'volume' 'backend_names' ${be1},${be2}
-
-}
-
-BACKENDS='lvm ceph nfs'
-RGEX="(.*test_volume_retype_with_migration.*|.*test_volume_migrate_attached.*)"
-final_result=0
-final_message='Migrations tests finished SUCCESSFULLY!'
-declare -A TEST_RESULTS
-start_time=`date +%s`
-for be1 in ${BACKENDS}; do
- for be2 in ${BACKENDS}; do
- if [ ${be1} != ${be2} ]; then
- configure_tempest_backends ${be1} ${be2}
- echo "============================================================"
- echo "Testing multibackend features: ${be1} vs ${be2}"
- echo "============================================================"
- run_tempest "${be1} vs ${be2}" ${RGEX}
- result=$?
- # If any of the test fail, we keep running but return failure as
- # the final result
- if [ ${result} -ne 0 ]; then
- TEST_RESULTS[${be1},${be2}]="FAILURE"
- final_message='Migrations tests FAILED!'
- final_result=1
- else
- TEST_RESULTS[${be1},${be2}]="SUCCESS"
- fi
- fi
- done
-done
-end_time=`date +%s`
-elapsed=$(expr $(expr ${end_time} - ${start_time}) / 60)
-
-# Print the results
-num_rows=$(echo $BACKENDS | wc -w)
-fmt=" %15s"
-echo "============================================================"
-echo " ${final_message} In ${elapsed} minutes."
-echo "============================================================"
-
-printf "$fmt" ''
-for be1 in ${BACKENDS}; do
- printf "$fmt" ${be1}
-done
-echo
-for be1 in ${BACKENDS}; do
- printf "$fmt" ${be1}
- for be2 in ${BACKENDS}; do
- if [ ${be1} == ${be2} ]; then
- printf "$fmt" '---'
- else
- printf "$fmt" ${TEST_RESULTS[${be1},${be2}]}
- fi
- done
- echo
-done
-
-exit ${final_result}
diff --git a/tools/hooks/utils.sh b/tools/hooks/utils.sh
deleted file mode 100755
index ab42e0e78..000000000
--- a/tools/hooks/utils.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-function run_tempest {
- local message=$1
- local tempest_regex=$2
- sudo -H -u ${TEMPEST_USER} tox -eall -- $tempest_regex \
- --concurrency=${TEMPEST_CONCURRENCY}
- exitcode=$?
- return ${exitcode}
-}