Browse Source

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.

This workaround fix was carried over from the change [2] in the Manila
project.

[1] I65b56ff681d6c27094380693c953fbc3664eceb0
[2] I516a6c9ab4396b14e3984d5f810210e4fcf7ec85

Change-Id: I09df56aa611ba755c282c575f712261c48385fe9
Related-Bug: #1531049
Ramana Raja 3 years ago
parent
commit
2cfbc1db61
1 changed files with 40 additions and 18 deletions
  1. 40
    18
      manila/post_test_hook.sh

+ 40
- 18
manila/post_test_hook.sh View File

@@ -14,6 +14,8 @@
14 14
 
15 15
 # This script is executed inside post_test_hook function in devstack gate.
16 16
 
17
+TEMPEST_CONFIG=$BASE/new/tempest/etc/tempest.conf
18
+
17 19
 sudo chown -R jenkins:stack $BASE/new/tempest
18 20
 sudo chown -R jenkins:stack $BASE/data/tempest
19 21
 sudo chmod -R o+rx $BASE/new/devstack/files
@@ -25,57 +27,57 @@ source $BASE/new/devstack/functions
25 27
 
26 28
 if [[ "$JOB_NAME" =~ "glusterfs-native" ]]; then
27 29
     local BACKEND_NAME="GLUSTERNATIVE"
28
-    iniset $BASE/new/tempest/etc/tempest.conf share enable_protocols glusterfs
29
-    iniset $BASE/new/tempest/etc/tempest.conf share storage_protocol glusterfs
30
+    iniset $TEMPEST_CONFIG share enable_protocols glusterfs
31
+    iniset $TEMPEST_CONFIG share storage_protocol glusterfs
30 32
     # Disable tempest config option that enables creation of 'ip' type access
31 33
     # rules by default during tempest test runs.
32
-    iniset $BASE/new/tempest/etc/tempest.conf share enable_ip_rules_for_protocols
33
-    iniset $BASE/new/tempest/etc/tempest.conf share enable_cert_rules_for_protocols glusterfs
34
-    iniset $BASE/new/tempest/etc/tempest.conf share capability_snapshot_support True
34
+    iniset $TEMPEST_CONFIG share enable_ip_rules_for_protocols
35
+    iniset $TEMPEST_CONFIG share enable_cert_rules_for_protocols glusterfs
36
+    iniset $TEMPEST_CONFIG share capability_snapshot_support True
35 37
 else
36 38
     local BACKEND_NAME="GLUSTERFS"
37
-    iniset $BASE/new/tempest/etc/tempest.conf share enable_protocols nfs
38
-    iniset $BASE/new/tempest/etc/tempest.conf share enable_ip_rules_for_protocols nfs
39
-    iniset $BASE/new/tempest/etc/tempest.conf share storage_protocol NFS
39
+    iniset $TEMPEST_CONFIG share enable_protocols nfs
40
+    iniset $TEMPEST_CONFIG share enable_ip_rules_for_protocols nfs
41
+    iniset $TEMPEST_CONFIG share storage_protocol NFS
40 42
 fi
41 43
 
42 44
 
43
-iniset $BASE/new/tempest/etc/tempest.conf share backend_names $BACKEND_NAME
45
+iniset $TEMPEST_CONFIG share backend_names $BACKEND_NAME
44 46
 
45 47
 # Set two retries for CI jobs
46
-iniset $BASE/new/tempest/etc/tempest.conf share share_creation_retry_number 2
48
+iniset $TEMPEST_CONFIG share share_creation_retry_number 2
47 49
 
48 50
 # Suppress errors in cleanup of resources
49 51
 SUPPRESS_ERRORS=${SUPPRESS_ERRORS_IN_CLEANUP:-True}
50
-iniset $BASE/new/tempest/etc/tempest.conf share suppress_errors_in_cleanup $SUPPRESS_ERRORS
52
+iniset $TEMPEST_CONFIG share suppress_errors_in_cleanup $SUPPRESS_ERRORS
51 53
 
52 54
 
53 55
 # Disable multi_backend tests
54 56
 RUN_MANILA_MULTI_BACKEND_TESTS=${RUN_MANILA_MULTI_BACKEND_TESTS:-False}
55
-iniset $BASE/new/tempest/etc/tempest.conf share multi_backend $RUN_MANILA_MULTI_BACKEND_TESTS
57
+iniset $TEMPEST_CONFIG share multi_backend $RUN_MANILA_MULTI_BACKEND_TESTS
56 58
 
57 59
 # Disable manage/unmanage tests
58 60
 RUN_MANILA_MANAGE_TESTS=${RUN_MANILA_MANAGE_TESTS:-False}
59
-iniset $BASE/new/tempest/etc/tempest.conf share run_manage_unmanage_tests $RUN_MANILA_MANAGE_TESTS
61
+iniset $TEMPEST_CONFIG share run_manage_unmanage_tests $RUN_MANILA_MANAGE_TESTS
60 62
 
61 63
 # Disable extend tests
62 64
 RUN_MANILA_EXTEND_TESTS=${RUN_MANILA_EXTEND_TESTS:-False}
63
-iniset $BASE/new/tempest/etc/tempest.conf share run_extend_tests $RUN_MANILA_EXTEND_TESTS
65
+iniset $TEMPEST_CONFIG share run_extend_tests $RUN_MANILA_EXTEND_TESTS
64 66
 
65 67
 # Disable shrink tests
66 68
 RUN_MANILA_SHRINK_TESTS=${RUN_MANILA_SHRINK_TESTS:-False}
67
-iniset $BASE/new/tempest/etc/tempest.conf share run_shrink_tests $RUN_MANILA_SHRINK_TESTS
69
+iniset $TEMPEST_CONFIG share run_shrink_tests $RUN_MANILA_SHRINK_TESTS
68 70
 
69 71
 # Disable multi_tenancy tests
70
-iniset $BASE/new/tempest/etc/tempest.conf share multitenancy_enabled False
72
+iniset $TEMPEST_CONFIG share multitenancy_enabled False
71 73
 
72 74
 # Disable snapshot tests
73 75
 RUN_MANILA_SNAPSHOT_TESTS=${RUN_MANILA_SNAPSHOT_TESTS:-False}
74
-iniset $BASE/new/tempest/etc/tempest.conf share run_snapshot_tests $RUN_MANILA_SNAPSHOT_TESTS
76
+iniset $TEMPEST_CONFIG share run_snapshot_tests $RUN_MANILA_SNAPSHOT_TESTS
75 77
 
76 78
 # Disable consistency group tests
77 79
 RUN_MANILA_CG_TESTS=${RUN_MANILA_CG_TESTS:-False}
78
-iniset $BASE/new/tempest/etc/tempest.conf share run_consistency_group_tests $RUN_MANILA_CG_TESTS
80
+iniset $TEMPEST_CONFIG share run_consistency_group_tests $RUN_MANILA_CG_TESTS
79 81
 
80 82
 # let us control if we die or not
81 83
 set +o errexit
@@ -92,5 +94,25 @@ fi
92 94
 # check if tempest plugin was installed correctly
93 95
 echo 'import pkg_resources; print list(pkg_resources.iter_entry_points("tempest.test_plugins"))' | python
94 96
 
97
+# Workaround for Tempest architectural changes
98
+# See bugs:
99
+# 1) https://bugs.launchpad.net/manila/+bug/1531049
100
+# 2) https://bugs.launchpad.net/tempest/+bug/1524717
101
+ADMIN_TENANT_NAME=${ADMIN_TENANT_NAME:-"admin"}
102
+ADMIN_PASSWORD=${ADMIN_PASSWORD:-"secretadmin"}
103
+iniset $TEMPEST_CONFIG auth admin_username ${ADMIN_USERNAME:-"admin"}
104
+iniset $TEMPEST_CONFIG auth admin_password $ADMIN_PASSWORD
105
+iniset $TEMPEST_CONFIG auth admin_tenant_name $ADMIN_TENANT_NAME
106
+iniset $TEMPEST_CONFIG auth admin_domain_name ${ADMIN_DOMAIN_NAME:-"Default"}
107
+iniset $TEMPEST_CONFIG identity username ${TEMPEST_USERNAME:-"demo"}
108
+iniset $TEMPEST_CONFIG identity password $ADMIN_PASSWORD
109
+iniset $TEMPEST_CONFIG identity tenant_name ${TEMPEST_TENANT_NAME:-"demo"}
110
+iniset $TEMPEST_CONFIG identity alt_username ${ALT_USERNAME:-"alt_demo"}
111
+iniset $TEMPEST_CONFIG identity alt_password $ADMIN_PASSWORD
112
+iniset $TEMPEST_CONFIG identity alt_tenant_name ${ALT_TENANT_NAME:-"alt_demo"}
113
+iniset $TEMPEST_CONFIG validation ip_version_for_ssh 4
114
+iniset $TEMPEST_CONFIG validation ssh_timeout $BUILD_TIMEOUT
115
+iniset $TEMPEST_CONFIG validation network_for_ssh ${PRIVATE_NETWORK_NAME:-"private"}
116
+
95 117
 echo "Running tempest manila test suites"
96 118
 sudo -H -u jenkins tox -eall-plugin $MANILA_TESTS -- --concurrency=$MANILA_TEMPEST_CONCURRENCY

Loading…
Cancel
Save