Fix CI Tempest jobs

After merge of change [1] to devstack project, preconfigured creds for
Tempest cannot be used anymore. But Manila requires such.
For the moment, latest Tempest interfaces cannot allow us to use
preconfigured creds because of bug #1524717.
So, until this bug fixed, we should workaround Devstack changes and
set legacy opts explicitly.

[1] I65b56ff681d6c27094380693c953fbc3664eceb0

Related-Bug: #1531049
Closes-Bug: #1531189
Change-Id: I4dc266713ec06bc6e98616a1277c8ae6cadf199d
This commit is contained in:
Endre Karlson 2016-01-05 17:27:22 +01:00
parent 62f578174b
commit 84bb7226ce
3 changed files with 41 additions and 5 deletions

View File

@ -5,5 +5,33 @@ set -ex
# Run the Designate DevStack exercises # Run the Designate DevStack exercises
$BASE/new/designate/devstack/exercise.sh $BASE/new/designate/devstack/exercise.sh
# Import functions needed for the below workaround
source $BASE/new/devstack/functions
# Workaround for Tempest architectural changes
# See bugs:
# 1) https://bugs.launchpad.net/manila/+bug/1531049
# 2) https://bugs.launchpad.net/tempest/+bug/1524717
TEMPEST_CONFIG=$BASE/new/tempest/etc/tempest.conf
ADMIN_TENANT_NAME=${ADMIN_TENANT_NAME:-"admin"}
ADMIN_PASSWORD=${ADMIN_PASSWORD:-"secretadmin"}
sudo chown -R jenkins:stack $BASE/new/tempest
sudo chown -R jenkins:stack $BASE/data/tempest
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"}
# Run the Designate Tempest tests # Run the Designate Tempest tests
sudo ./run_tempest_tests.sh sudo ./run_tempest_tests.sh

View File

@ -138,9 +138,9 @@ class DesignateAdminClient(BaseDesignateClient):
def _get_keystone_auth_provider(self, with_token=True): def _get_keystone_auth_provider(self, with_token=True):
creds = KeystoneV2Credentials( creds = KeystoneV2Credentials(
username=cfg.CONF.identity.admin_username, username=cfg.CONF.auth.admin_username,
password=cfg.CONF.identity.admin_password, password=cfg.CONF.auth.admin_password,
tenant_name=cfg.CONF.identity.admin_tenant_name, tenant_name=cfg.CONF.auth.admin_tenant_name,
) )
return self._create_keystone_auth_provider(creds, with_token) return self._create_keystone_auth_provider(creds, with_token)

View File

@ -19,7 +19,11 @@ import os
from oslo_config import cfg from oslo_config import cfg
cfg.CONF.register_group(cfg.OptGroup( cfg.CONF.register_group(cfg.OptGroup(
name='identity', title="Configuration for Keystone auth" name='identity', title="Configuration for Keystone identity"
))
cfg.CONF.register_group(cfg.OptGroup(
name='auth', title="Configuration for Keystone auth"
)) ))
cfg.CONF.register_group(cfg.OptGroup( cfg.CONF.register_group(cfg.OptGroup(
@ -49,11 +53,15 @@ cfg.CONF.register_opts([
cfg.StrOpt('alt_password', secret=True), cfg.StrOpt('alt_password', secret=True),
cfg.StrOpt('alt_domain_name'), cfg.StrOpt('alt_domain_name'),
], group='identity')
cfg.CONF.register_opts([
cfg.StrOpt('admin_username'), cfg.StrOpt('admin_username'),
cfg.StrOpt('admin_tenant_name'), cfg.StrOpt('admin_tenant_name'),
cfg.StrOpt('admin_password', secret=True), cfg.StrOpt('admin_password', secret=True),
cfg.StrOpt('admin_domain_name'), cfg.StrOpt('admin_domain_name'),
], group='identity') ], group="auth")
cfg.CONF.register_opts([ cfg.CONF.register_opts([
cfg.StrOpt('designate_endpoint', help="The Designate API endpoint"), cfg.StrOpt('designate_endpoint', help="The Designate API endpoint"),