From 01e143de49182da1880af2fe77c3d1573011a82e Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Thu, 26 Jan 2023 23:12:59 -0600 Subject: [PATCH] Fix setting the tempest virtual env constraints env var Grenade 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 grenade script install the tempest second time on new devstack where we need to use master constraints but env var TOX_CONSTRAINTS_FILE/UPPER_CONSTRAINTS_FILE set previously in tempest installation in old devstack point to the stable constraints. One case where it started failing when we tried to pin the stable/wallaby with Tempest 29.0.0 - https://review.opendev.org/c/openstack/devstack/+/871782 and stable/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 to use the master constraints. Closes-Bug: #2003993 Change-Id: I8c623008292f3b2dd2cd6d596feea552194acd89 --- grenade.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/grenade.sh b/grenade.sh index 02435e9f..380ab3a9 100755 --- a/grenade.sh +++ b/grenade.sh @@ -308,6 +308,15 @@ if [[ "$RUN_BASE" == "True" ]]; then # TOX_CONSTRAINTS_FILE then we can remove the old one. export UPPER_CONSTRAINTS_FILE=$TEMPEST_VENV_UPPER_CONSTRAINTS export TOX_CONSTRAINTS_FILE=$TEMPEST_VENV_UPPER_CONSTRAINTS + else + # NOTE(gmann): we need to set the below env var pointing to master + # constraints even that is what default in tox.ini. Otherwise it + # can create the issue for grenade run where old and new devstack + # can have different tempest (old and master) to install. For + # detail problem, refer to the + # https://bugs.launchpad.net/devstack/+bug/2003993 + export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/master + export TOX_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/master fi tox -esmoke -- --concurrency=$TEMPEST_CONCURRENCY if [ "${GRENADE_USE_EXTERNAL_DEVSTACK}" != "True" ]; then