Skip to content

Commit 7fe9981

Browse files
author
Ghanshyam Mann
committed
Fix setting the tempest virtual env constraints env var
Devstack set the env var TOX_CONSTRAINTS_FILE/UPPER_CONSTRAINTS_FILE which are used to use the constraints during Tempest virtual env installation. Those env var are set to non-master constraint when we need to use non-master constraints but when we need to use the master constraints we do not set/reset them point to master constraints. This create the issue when running the grenade job where we run Tempest on the old devstack as well as in the new devstack. When tempest is installed on old devstack then old tempest is used and it sets these env var to stable/<branch> constraints (this is the case when old devstack (the stable branch is in EM phase) uses the old tempest not the master tempest), all good till now. But the problem comes when in the same grenade script run upgrade-tempest install the master tempest (when new devstack branches are in the 'supported' phase and use the master tempest means) and are supposed to use the master constraints. But the TOX_CONSTRAINTS_FILE/UPPER_CONSTRAINTS_FILE env var set by old tempest is used by the tempest and due to a mismatch in constraints it fails. This happened when we tried to pin the stable/wallaby with Tempest 29.0.0 - https://review.opendev.org/c/openstack/devstack/+/871782 and table/xena grenade job failed (stable/xena use master tempest and supposed to use master constraints) - https://zuul.opendev.org/t/openstack/build/fb7b2a8b562c42bab4c741819f5e9732/log/controller/logs/grenade.sh_log.txt#16641 We should set/reset those constraint env var to master constraints if configuration tell devstack to use the master constraints. [1] https://github.com/openstack/devstack/blob/71c3c40c269a50303247855319d1d3a5d30f6773/lib/tempest#L124 Closes-Bug: #2003993 Change-Id: I5e938139b47f443a4c358415d0d4dcf6549cd085
1 parent 71c3c40 commit 7fe9981

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lib/tempest

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ function set_tempest_venv_constraints {
128128
(cd $REQUIREMENTS_DIR &&
129129
git show master:upper-constraints.txt 2>/dev/null ||
130130
git show origin/master:upper-constraints.txt) > $tmp_c
131+
# NOTE(gmann): we need to set the below env var pointing to master
132+
# constraints even that is what default in tox.ini. Otherwise it can
133+
# create the issue for grenade run where old and new devstack can have
134+
# different tempest (old and master) to install. For detail problem,
135+
# refer to the https://bugs.launchpad.net/devstack/+bug/2003993
136+
export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/master
137+
export TOX_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/master
131138
else
132139
echo "Using $TEMPEST_VENV_UPPER_CONSTRAINTS constraints in Tempest virtual env."
133140
cat $TEMPEST_VENV_UPPER_CONSTRAINTS > $tmp_c

0 commit comments

Comments
 (0)