summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhanshyam Mann <gmann@ghanshyammann.com>2022-05-20 20:17:35 -0500
committerElod Illes <elod.illes@est.tech>2022-05-23 09:31:56 +0200
commite21fb6793443e9eb6eb25cb3be0894ce25670829 (patch)
tree00e48cc93c9bfb87ff5a48b89e72ce7bd988c2c7
parent156ce0b2477240d88ea42a1e4b6b6f951adbfd10 (diff)
downloadnova-e21fb6793443e9eb6eb25cb3be0894ce25670829.tar.gz
[stable-only] Use Tempest's run upper constraints from devstack
Devstack creates the tempest virtual env with upper constraints set by TEMPEST_VENV_UPPER_CONSTRAINTS[1]. For stable/train, they are stable/train constraints but then nova run tempest in run_tests.sh then it does not set/pass the upper constraints so master constraints is used and it ends up recreating the tempest virtual env and fail the job. We should make sure that upper constraints used in nova tempest run and devstack is same. - https://zuul.opendev.org/t/openstack/build/f50f83571d4348e996e175ea5aad97f7/log/job-output.txt#5100 [1] https://github.com/openstack/devstack/blob/stable/train/stackrc#L320 Change-Id: Iad2d198c58512b26dc2733b97bedeffc00108656
-rwxr-xr-xgate/live_migration/hooks/utils.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/gate/live_migration/hooks/utils.sh b/gate/live_migration/hooks/utils.sh
index 9f98ca2e25..e494ae03f8 100755
--- a/gate/live_migration/hooks/utils.sh
+++ b/gate/live_migration/hooks/utils.sh
@@ -3,7 +3,17 @@
function run_tempest {
local message=$1
local tempest_regex=$2
- sudo -H -u tempest tox -eall -- $tempest_regex --concurrency=$TEMPEST_CONCURRENCY
+
+ # NOTE(gmann): Set upper constraint for Tempest run so that it matches
+ # with what devstack is using and does not recreate the tempest virtual
+ # env.
+ TEMPEST_VENV_UPPER_CONSTRAINTS=$(set +o xtrace &&
+ source $BASE/new/devstack/stackrc &&
+ echo $TEMPEST_VENV_UPPER_CONSTRAINTS)
+ export UPPER_CONSTRAINTS_FILE=$TEMPEST_VENV_UPPER_CONSTRAINTS
+ echo "using $UPPER_CONSTRAINTS_FILE for tempest run"
+
+ sudo -H -u tempest UPPER_CONSTRAINTS_FILE=$UPPER_CONSTRAINTS_FILE tox -eall -- $tempest_regex --concurrency=$TEMPEST_CONCURRENCY
exitcode=$?
if [[ $exitcode -ne 0 ]]; then
die $LINENO "$message failure"