Fix Manila CI Tempest authentication issue

With the change [1] to DevStack project, preconfigured creds for Tempest,
required by Manila, cannot be used anymore. And for now, latest Tempest
interfaces do not allow use of preconfigured creds due to bug #1524717.
So, until this bug is fixed, workaround Devstack changes by setting legacy
options explicitly.

[1] I65b56ff681d6c27094380693c953fbc3664eceb0

Related-Bug: #1531049

Change-Id: If86b9ba11eed9412794468cc4787d0f43fc52571
This commit is contained in:
Ramana Raja 2016-01-06 22:42:19 +05:30
parent fbb6ddc7f7
commit 50f41a43f8
1 changed files with 38 additions and 15 deletions

View File

@ -16,6 +16,8 @@
# First argument ($1) expects 'multibackend' as value for setting appropriate
# tempest conf opts, all other values will assume singlebackend installation.
TEMPEST_CONFIG=$BASE/new/tempest/etc/tempest.conf
sudo chown -R jenkins:stack $BASE/new/tempest
sudo chown -R jenkins:stack $BASE/data/tempest
sudo chmod -R o+rx $BASE/new/devstack/files
@ -24,49 +26,49 @@ sudo chmod -R o+rx $BASE/new/devstack/files
source $BASE/new/devstack/functions
export BACKENDS_NAMES="HDFS1"
iniset $BASE/new/tempest/etc/tempest.conf share enable_protocols hdfs
iniset $BASE/new/tempest/etc/tempest.conf share storage_protocol HDFS
iniset $BASE/new/tempest/etc/tempest.conf share enable_user_rules_for_protocols hdfs
iniset $TEMPEST_CONFIG share enable_protocols hdfs
iniset $TEMPEST_CONFIG share storage_protocol HDFS
iniset $TEMPEST_CONFIG share enable_user_rules_for_protocols hdfs
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
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=${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 multi_backend tests
RUN_MANILA_MULTI_BACKEND_TESTS=${RUN_MANILA_MULTI_BACKEND_TESTS:-True}
iniset $BASE/new/tempest/etc/tempest.conf share multi_backend $RUN_MANILA_MULTI_BACKEND_TESTS
iniset $BASE/new/tempest/etc/tempest.conf share backend_names $MANILA_ENABLED_BACKENDS
iniset $TEMPEST_CONFIG share multi_backend $RUN_MANILA_MULTI_BACKEND_TESTS
iniset $TEMPEST_CONFIG share backend_names $MANILA_ENABLED_BACKENDS
# Disable manage/unmanage tests
RUN_MANILA_MANAGE_TESTS=${RUN_MANILA_MANAGE_TESTS:-False}
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
# Disable extend tests
RUN_MANILA_EXTEND_TESTS=${RUN_MANILA_EXTEND_TESTS:-True}
iniset $BASE/new/tempest/etc/tempest.conf share run_extend_tests $RUN_MANILA_EXTEND_TESTS
iniset $TEMPEST_CONFIG share run_extend_tests $RUN_MANILA_EXTEND_TESTS
# Disable shrink tests
RUN_MANILA_SHRINK_TESTS=${RUN_MANILA_SHRINK_TESTS:-False}
iniset $BASE/new/tempest/etc/tempest.conf share run_shrink_tests $RUN_MANILA_SHRINK_TESTS
iniset $TEMPEST_CONFIG share run_shrink_tests $RUN_MANILA_SHRINK_TESTS
# Disable multi_tenancy tests
iniset $BASE/new/tempest/etc/tempest.conf share multitenancy_enabled False
iniset $TEMPEST_CONFIG share multitenancy_enabled False
# Enable snapshot tests
RUN_MANILA_SNAPSHOT_TESTS=${RUN_MANILA_SNAPSHOT_TESTS:-True}
iniset $BASE/new/tempest/etc/tempest.conf share run_snapshot_tests $RUN_MANILA_SNAPSHOT_TESTS
iniset $TEMPEST_CONFIG share run_snapshot_tests $RUN_MANILA_SNAPSHOT_TESTS
# Disable enable_ip_rules_for_protocols
iniset $BASE/new/tempest/etc/tempest.conf share enable_ip_rules_for_protocols
iniset $TEMPEST_CONFIG share enable_ip_rules_for_protocols
# Disable consistency_group_tests
RUN_MANILA_CONSISTENCY_GROUP_TESTS=${RUN_MANILA_CONSISTENCY_GROUP_TESTS:-False}
iniset $BASE/new/tempest/etc/tempest.conf share run_consistency_group_tests $RUN_MANILA_CONSISTENCY_GROUP_TESTS
iniset $TEMPEST_CONFIG share run_consistency_group_tests $RUN_MANILA_CONSISTENCY_GROUP_TESTS
# let us control if we die or not
set +o errexit
@ -78,5 +80,26 @@ export MANILA_TESTS=${MANILA_TESTS:-'manila_tempest_tests.tests.api*'}
# check if tempest plugin was installed corretly
echo 'import pkg_resources; print list(pkg_resources.iter_entry_points("tempest.test_plugins"))' | python
# Workaround for Tempest architectural changes
# See bugs:
# 1) https://bugs.launchpad.net/manila/+bug/1531049
# 2) https://bugs.launchpad.net/tempest/+bug/1524717
ADMIN_TENANT_NAME=${ADMIN_TENANT_NAME:-"admin"}
ADMIN_PASSWORD=${ADMIN_PASSWORD:-"secretadmin"}
iniset $TEMPEST_CONFIG auth admin_username ${ADMIN_USERNAME:-"admin"}
iniset $TEMPEST_CONFIG auth admin_password $ADMIN_PASSWORD
iniset $TEMPEST_CONFIG auth admin_tenant_name $ADMIN_TENANT_NAME
iniset $TEMPEST_CONFIG auth admin_domain_name ${ADMIN_DOMAIN_NAME:-"Default"}
iniset $TEMPEST_CONFIG identity username ${TEMPEST_USERNAME:-"demo"}
iniset $TEMPEST_CONFIG identity password $ADMIN_PASSWORD
iniset $TEMPEST_CONFIG identity tenant_name ${TEMPEST_TENANT_NAME:-"demo"}
iniset $TEMPEST_CONFIG identity alt_username ${ALT_USERNAME:-"alt_demo"}
iniset $TEMPEST_CONFIG identity alt_password $ADMIN_PASSWORD
iniset $TEMPEST_CONFIG identity alt_tenant_name ${ALT_TENANT_NAME:-"alt_demo"}
iniset $TEMPEST_CONFIG validation ip_version_for_ssh 4
iniset $TEMPEST_CONFIG validation ssh_timeout $BUILD_TIMEOUT
iniset $TEMPEST_CONFIG validation network_for_ssh ${PRIVATE_NETWORK_NAME:-"private"}
echo "Running tempest manila test suites"
sudo -H -u jenkins tox -eall-plugin $MANILA_TESTS -- --concurrency=$MANILA_TEMPEST_CONCURRENCY