Fix Grenade DSVM Tempest upper constraints

The initial source is too early when GRENADE_USE_EXTERNAL_DEVSTACK
is False (as, e.g., in DSVM [aka devstack-gate, aka legacy] jobs).
The issue was introduced in
I66b5d128c3dbe51289410760ea1cbf7f61c55c2f
fixing the Tempest upper constraints to be properly pinned.
It did not affect Zuul v3 (aka new) jobs.

Also, let's only source the one variable that we need rather than
the whole file.

See https://review.opendev.org/c/openstack/devstack/+/785547
for an example failure.

Closes-Bug: #1923343
Change-Id: If5f14654ab9aee2a140bbfb869b50d63cb289fdf
This commit is contained in:
Radosław Piliszek 2021-04-11 10:25:02 +00:00
parent 1e9fc91401
commit 47689aa917
1 changed files with 6 additions and 2 deletions

View File

@ -39,8 +39,6 @@ export DSTOOLS_VERSION=${DSTOOLS_VERSION:-0.4.0}
source $GRENADE_DIR/grenaderc
source $GRENADE_DIR/inc/bootstrap
source $BASE_DEVSTACK_DIR/stackrc
while getopts bqs:t c; do
case $c in
b)
@ -292,6 +290,12 @@ if [[ "$RUN_BASE" == "True" ]]; then
echo_summary "Running base smoke test"
cd $BASE_RELEASE_DIR/tempest
# NOTE(yoctozepto): Grenade does not know about
# TEMPEST_VENV_UPPER_CONSTRAINTS, only DevStack does.
# This sources that one variable from it.
TEMPEST_VENV_UPPER_CONSTRAINTS=$(set +o xtrace &&
source $BASE_DEVSTACK_DIR/stackrc &&
echo $TEMPEST_VENV_UPPER_CONSTRAINTS)
# NOTE(gmann): If gate explicitly set the non master
# constraints to use for Tempest venv then use the same
# while running the tests too otherwise, it will recreate