Merge "Use new approach for setting up CI jobs"
This commit is contained in:
commit
35b8ac7c05
|
@ -23,33 +23,51 @@ sudo chmod -R o+rx $BASE/new/devstack/files
|
||||||
# Import devstack functions 'iniset', 'iniget' and 'trueorfalse'
|
# Import devstack functions 'iniset', 'iniget' and 'trueorfalse'
|
||||||
source $BASE/new/devstack/functions
|
source $BASE/new/devstack/functions
|
||||||
|
|
||||||
if [[ "$1" =~ "multibackend" ]]; then
|
export TEMPEST_CONFIG=$BASE/new/tempest/etc/tempest.conf
|
||||||
# if arg $1 has "multibackend", then we assume multibackend installation
|
|
||||||
iniset $BASE/new/tempest/etc/tempest.conf share multi_backend True
|
|
||||||
|
|
||||||
iniset $BASE/new/tempest/etc/tempest.conf share run_migration_tests $(trueorfalse True RUN_MANILA_MIGRATION_TESTS)
|
# === Handle script arguments ===
|
||||||
|
|
||||||
|
# First argument is expected to contain value equal either to 'singlebackend'
|
||||||
|
# or 'multibackend' that defines how many back-ends are used.
|
||||||
|
BACK_END_TYPE=$1
|
||||||
|
|
||||||
|
# Second argument is expected to have codename of a share driver.
|
||||||
|
DRIVER=$2
|
||||||
|
|
||||||
|
# Third argument is expected to contain either 'api' or 'scenario' values
|
||||||
|
# that define test suites to be run.
|
||||||
|
TEST_TYPE=$3
|
||||||
|
|
||||||
|
# Fourth argument is expected to be boolean-like and it should be 'true'
|
||||||
|
# when PostgreSQL DB back-end is used and 'false' when MySQL.
|
||||||
|
POSTGRES_ENABLED=$4
|
||||||
|
POSTGRES_ENABLED=$(trueorfalse True POSTGRES_ENABLED)
|
||||||
|
|
||||||
|
if [[ "$BACK_END_TYPE" == "multibackend" ]]; then
|
||||||
|
iniset $TEMPEST_CONFIG share multi_backend True
|
||||||
|
iniset $TEMPEST_CONFIG share run_migration_tests $(trueorfalse True RUN_MANILA_MIGRATION_TESTS)
|
||||||
|
|
||||||
# Set share backends names, they are defined within pre_test_hook
|
# Set share backends names, they are defined within pre_test_hook
|
||||||
export BACKENDS_NAMES="LONDON,PARIS"
|
export BACKENDS_NAMES="LONDON,PARIS"
|
||||||
else
|
else
|
||||||
export BACKENDS_NAMES="LONDON"
|
export BACKENDS_NAMES="LONDON"
|
||||||
fi
|
fi
|
||||||
iniset $BASE/new/tempest/etc/tempest.conf share backend_names $BACKENDS_NAMES
|
iniset $TEMPEST_CONFIG share backend_names $BACKENDS_NAMES
|
||||||
|
|
||||||
# Set two retries for CI jobs
|
# Set two retries for CI jobs
|
||||||
iniset $BASE/new/tempest/etc/tempest.conf share share_creation_retry_number 2
|
iniset $TEMPEST_CONFIG share share_creation_retry_number 2
|
||||||
|
|
||||||
# Suppress errors in cleanup of resources
|
# Suppress errors in cleanup of resources
|
||||||
SUPPRESS_ERRORS=${SUPPRESS_ERRORS_IN_CLEANUP:-True}
|
SUPPRESS_ERRORS=${SUPPRESS_ERRORS_IN_CLEANUP:-True}
|
||||||
iniset $BASE/new/tempest/etc/tempest.conf share suppress_errors_in_cleanup $SUPPRESS_ERRORS
|
iniset $TEMPEST_CONFIG share suppress_errors_in_cleanup $SUPPRESS_ERRORS
|
||||||
|
|
||||||
# Enable consistency group tests
|
# Enable consistency group tests
|
||||||
RUN_MANILA_CG_TESTS=${RUN_MANILA_CG_TESTS:-True}
|
RUN_MANILA_CG_TESTS=${RUN_MANILA_CG_TESTS:-True}
|
||||||
iniset $BASE/new/tempest/etc/tempest.conf share run_consistency_group_tests $RUN_MANILA_CG_TESTS
|
iniset $TEMPEST_CONFIG share run_consistency_group_tests $RUN_MANILA_CG_TESTS
|
||||||
|
|
||||||
# Enable manage/unmanage tests
|
# Enable manage/unmanage tests
|
||||||
RUN_MANILA_MANAGE_TESTS=${RUN_MANILA_MANAGE_TESTS:-True}
|
RUN_MANILA_MANAGE_TESTS=${RUN_MANILA_MANAGE_TESTS:-True}
|
||||||
iniset $BASE/new/tempest/etc/tempest.conf share run_manage_unmanage_tests $RUN_MANILA_MANAGE_TESTS
|
iniset $TEMPEST_CONFIG share run_manage_unmanage_tests $RUN_MANILA_MANAGE_TESTS
|
||||||
|
|
||||||
MANILA_CONF=${MANILA_CONF:-/etc/manila/manila.conf}
|
MANILA_CONF=${MANILA_CONF:-/etc/manila/manila.conf}
|
||||||
|
|
||||||
|
@ -80,15 +98,25 @@ if [[ -z "$MULTITENANCY_ENABLED" ]]; then
|
||||||
echo 'Allowed only same driver modes for all backends to be run with Tempest job.'
|
echo 'Allowed only same driver modes for all backends to be run with Tempest job.'
|
||||||
exit 1
|
exit 1
|
||||||
elif [[ $NO_SHARE_SERVER_HANDLING_MODES -ge 1 ]]; then
|
elif [[ $NO_SHARE_SERVER_HANDLING_MODES -ge 1 ]]; then
|
||||||
iniset $BASE/new/tempest/etc/tempest.conf share multitenancy_enabled False
|
MULTITENANCY_ENABLED='False'
|
||||||
elif [[ $WITH_SHARE_SERVER_HANDLING_MODES -ge 1 ]]; then
|
elif [[ $WITH_SHARE_SERVER_HANDLING_MODES -ge 1 ]]; then
|
||||||
iniset $BASE/new/tempest/etc/tempest.conf share multitenancy_enabled True
|
MULTITENANCY_ENABLED='True'
|
||||||
else
|
else
|
||||||
echo 'Should never get here unless an error occurred.'
|
echo 'Should never get here unless an error occurred.'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
iniset $BASE/new/tempest/etc/tempest.conf share multitenancy_enabled $MULTITENANCY_ENABLED
|
MULTITENANCY_ENABLED=$(trueorfalse True MULTITENANCY_ENABLED)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set multitenancy configuration for Tempest
|
||||||
|
iniset $TEMPEST_CONFIG share multitenancy_enabled $MULTITENANCY_ENABLED
|
||||||
|
if [[ "$MULTITENANCY_ENABLED" == "False" ]]; then
|
||||||
|
# Using approach without handling of share servers we have bigger load for
|
||||||
|
# volume creation in Cinder using Generic driver. So, reduce amount of
|
||||||
|
# threads to avoid errors for Cinder volume creations that appear
|
||||||
|
# because of lack of free space.
|
||||||
|
MANILA_TEMPEST_CONCURRENCY=8
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# let us control if we die or not
|
# let us control if we die or not
|
||||||
|
@ -98,21 +126,19 @@ cd $BASE/new/tempest
|
||||||
export MANILA_TEMPEST_CONCURRENCY=${MANILA_TEMPEST_CONCURRENCY:-20}
|
export MANILA_TEMPEST_CONCURRENCY=${MANILA_TEMPEST_CONCURRENCY:-20}
|
||||||
export MANILA_TESTS=${MANILA_TESTS:-'manila_tempest_tests.tests.api'}
|
export MANILA_TESTS=${MANILA_TESTS:-'manila_tempest_tests.tests.api'}
|
||||||
|
|
||||||
# Run only NFS tests on MySQL backend to reduce amount of tests per job
|
if [[ "$TEST_TYPE" == "scenario" ]]; then
|
||||||
iniset $BASE/new/tempest/etc/tempest.conf share enable_protocols nfs
|
|
||||||
if [[ "$JOB_NAME" =~ "scenario" ]]; then
|
|
||||||
echo "Set test set to scenario only"
|
echo "Set test set to scenario only"
|
||||||
MANILA_TESTS='manila_tempest_tests.tests.scenario'
|
MANILA_TESTS='manila_tempest_tests.tests.scenario'
|
||||||
iniset $BASE/new/tempest/etc/tempest.conf share enable_protocols nfs,cifs
|
elif [[ "$DRIVER" == "generic" ]]; then
|
||||||
elif [[ "$JOB_NAME" =~ "postgres" ]]; then
|
if [[ "$POSTGRES_ENABLED" == "True" ]]; then
|
||||||
# Run only CIFS tests on PostgreSQL backend to reduce amount of tests per job
|
# Run only CIFS tests on PostgreSQL DB backend
|
||||||
iniset $BASE/new/tempest/etc/tempest.conf share enable_protocols cifs
|
# to reduce amount of tests per job using 'generic' share driver.
|
||||||
elif [[ "$JOB_NAME" =~ "no-share-servers" ]]; then
|
iniset $TEMPEST_CONFIG share enable_protocols cifs
|
||||||
# Using approach without handling of share servers we have bigger load for
|
else
|
||||||
# volume creation in Cinder using Generic driver. So, reduce amount of
|
# Run only NFS tests on MySQL DB backend to reduce amount of tests
|
||||||
# threads to avoid errors for Cinder volume creations that appear
|
# per job using 'generic' share driver.
|
||||||
# because of lack of free space.
|
iniset $TEMPEST_CONFIG share enable_protocols nfs
|
||||||
MANILA_TEMPEST_CONCURRENCY=8
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Also, we should wait until service VM is available
|
# Also, we should wait until service VM is available
|
||||||
|
|
|
@ -32,19 +32,26 @@ echo "MANILA_BACKEND2_CONFIG_GROUP_NAME=paris" >> $localrc_path
|
||||||
echo "MANILA_SHARE_BACKEND1_NAME=LONDON" >> $localrc_path
|
echo "MANILA_SHARE_BACKEND1_NAME=LONDON" >> $localrc_path
|
||||||
echo "MANILA_SHARE_BACKEND2_NAME=PARIS" >> $localrc_path
|
echo "MANILA_SHARE_BACKEND2_NAME=PARIS" >> $localrc_path
|
||||||
|
|
||||||
driver_handles_share_servers=$1
|
# === Handle script arguments ===
|
||||||
driver_handles_share_servers=$(trueorfalse True driver_handles_share_servers)
|
# First argument is expected to be a boolean-like value for DHSS.
|
||||||
|
DHSS=$1
|
||||||
|
DHSS=$(trueorfalse True DHSS)
|
||||||
|
|
||||||
echo "MANILA_OPTGROUP_london_driver_handles_share_servers=$driver_handles_share_servers" >> $localrc_path
|
# Second argument is expected to have codename of a share driver.
|
||||||
echo "MANILA_OPTGROUP_paris_driver_handles_share_servers=$driver_handles_share_servers" >> $localrc_path
|
DRIVER=$2
|
||||||
|
|
||||||
|
# Third argument is expected to contain value equal either to 'singlebackend'
|
||||||
|
# or 'multibackend' that defines how many back-ends should be configured.
|
||||||
|
BACK_END_TYPE=$3
|
||||||
|
|
||||||
|
echo "MANILA_OPTGROUP_london_driver_handles_share_servers=$DHSS" >> $localrc_path
|
||||||
|
echo "MANILA_OPTGROUP_paris_driver_handles_share_servers=$DHSS" >> $localrc_path
|
||||||
|
|
||||||
echo "MANILA_USE_SERVICE_INSTANCE_PASSWORD=True" >> $localrc_path
|
echo "MANILA_USE_SERVICE_INSTANCE_PASSWORD=True" >> $localrc_path
|
||||||
|
|
||||||
echo "MANILA_USE_DOWNGRADE_MIGRATIONS=True" >> $localrc_path
|
echo "MANILA_USE_DOWNGRADE_MIGRATIONS=True" >> $localrc_path
|
||||||
|
|
||||||
# JOB_NAME is defined in openstack-infra/config project
|
if [[ "$BACK_END_TYPE" == "multibackend" ]]; then
|
||||||
# used by CI/CD, where this script is intended to be used.
|
|
||||||
if [[ "$JOB_NAME" =~ "multibackend" ]]; then
|
|
||||||
echo "MANILA_MULTI_BACKEND=True" >> $localrc_path
|
echo "MANILA_MULTI_BACKEND=True" >> $localrc_path
|
||||||
else
|
else
|
||||||
echo "MANILA_MULTI_BACKEND=False" >> $localrc_path
|
echo "MANILA_MULTI_BACKEND=False" >> $localrc_path
|
||||||
|
@ -65,4 +72,3 @@ git checkout $MANILA_TEMPEST_COMMIT
|
||||||
|
|
||||||
# Print current Tempest status
|
# Print current Tempest status
|
||||||
git status
|
git status
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue