Browse Source

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
Endre Karlson 3 years ago
parent
commit
84bb7226ce

+ 28
- 0
devstack/gate/post_test_hook.sh View File

@@ -5,5 +5,33 @@ set -ex
5 5
 # Run the Designate DevStack exercises
6 6
 $BASE/new/designate/devstack/exercise.sh
7 7
 
8
+# Import functions needed for the below workaround
9
+source $BASE/new/devstack/functions
10
+
11
+# Workaround for Tempest architectural changes
12
+# See bugs:
13
+# 1) https://bugs.launchpad.net/manila/+bug/1531049
14
+# 2) https://bugs.launchpad.net/tempest/+bug/1524717
15
+TEMPEST_CONFIG=$BASE/new/tempest/etc/tempest.conf
16
+ADMIN_TENANT_NAME=${ADMIN_TENANT_NAME:-"admin"}
17
+ADMIN_PASSWORD=${ADMIN_PASSWORD:-"secretadmin"}
18
+
19
+sudo chown -R jenkins:stack $BASE/new/tempest
20
+sudo chown -R jenkins:stack $BASE/data/tempest
21
+
22
+iniset $TEMPEST_CONFIG auth admin_username ${ADMIN_USERNAME:-"admin"}
23
+iniset $TEMPEST_CONFIG auth admin_password $ADMIN_PASSWORD
24
+iniset $TEMPEST_CONFIG auth admin_tenant_name $ADMIN_TENANT_NAME
25
+iniset $TEMPEST_CONFIG auth admin_domain_name ${ADMIN_DOMAIN_NAME:-"Default"}
26
+iniset $TEMPEST_CONFIG identity username ${TEMPEST_USERNAME:-"demo"}
27
+iniset $TEMPEST_CONFIG identity password $ADMIN_PASSWORD
28
+iniset $TEMPEST_CONFIG identity tenant_name ${TEMPEST_TENANT_NAME:-"demo"}
29
+iniset $TEMPEST_CONFIG identity alt_username ${ALT_USERNAME:-"alt_demo"}
30
+iniset $TEMPEST_CONFIG identity alt_password $ADMIN_PASSWORD
31
+iniset $TEMPEST_CONFIG identity alt_tenant_name ${ALT_TENANT_NAME:-"alt_demo"}
32
+iniset $TEMPEST_CONFIG validation ip_version_for_ssh 4
33
+iniset $TEMPEST_CONFIG validation ssh_timeout $BUILD_TIMEOUT
34
+iniset $TEMPEST_CONFIG validation network_for_ssh ${PRIVATE_NETWORK_NAME:-"private"}
35
+
8 36
 # Run the Designate Tempest tests
9 37
 sudo ./run_tempest_tests.sh

+ 3
- 3
functionaltests/common/client.py View File

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

+ 10
- 2
functionaltests/common/config.py View File

@@ -19,7 +19,11 @@ import os
19 19
 from oslo_config import cfg
20 20
 
21 21
 cfg.CONF.register_group(cfg.OptGroup(
22
-    name='identity', title="Configuration for Keystone auth"
22
+    name='identity', title="Configuration for Keystone identity"
23
+))
24
+
25
+cfg.CONF.register_group(cfg.OptGroup(
26
+    name='auth', title="Configuration for Keystone auth"
23 27
 ))
24 28
 
25 29
 cfg.CONF.register_group(cfg.OptGroup(
@@ -49,11 +53,15 @@ cfg.CONF.register_opts([
49 53
     cfg.StrOpt('alt_password', secret=True),
50 54
     cfg.StrOpt('alt_domain_name'),
51 55
 
56
+
57
+], group='identity')
58
+
59
+cfg.CONF.register_opts([
52 60
     cfg.StrOpt('admin_username'),
53 61
     cfg.StrOpt('admin_tenant_name'),
54 62
     cfg.StrOpt('admin_password', secret=True),
55 63
     cfg.StrOpt('admin_domain_name'),
56
-], group='identity')
64
+], group="auth")
57 65
 
58 66
 cfg.CONF.register_opts([
59 67
     cfg.StrOpt('designate_endpoint', help="The Designate API endpoint"),

Loading…
Cancel
Save