Fix Tempest installtion on system wide for stable branch

INSTALL_TEMPEST flag enable to install Tempest by default on
devstack env which is meant for using on master gate only and has
to be false for stable branch. On stable branch master Tempest
on system wide can fail to install for various reason like constraint
etc. That is why we install Tempest on venv always.

This started failing the py2 jobs on stable/train gate[1] where
heat devstack plugin try to install Tempest on system wide also which try to
use py2 env (Tempest is py3 only now) because jobs is py2 and fail.

We need to set up the Tempest on system wide based on  INSTALL_TEMPEST flag
which is set to false on all stable branch to:
- https://review.opendev.org/#/q/I60949fb735c82959fb2cfcb6aeef9e33fb0445b6

Aslo includes below backport:

Check if subnet already added to router before adding it.

(cherry picked from commit c923b9c64b)

[1] https://zuul.opendev.org/t/openstack/build/398d906e73724ee6b91d8f32babc5035/log/logs/devstacklog.txt#37969
- https://review.opendev.org/#/c/717428/
- https://review.opendev.org/#/c/717529/

Change-Id: I13153881223c3a585052a94651b9ff082a75b283
This commit is contained in:
Ghanshyam Mann 2020-04-08 12:06:06 -05:00 committed by Rabi Mishra
parent 8fc8034c09
commit 2036260695
2 changed files with 5 additions and 3 deletions

View File

@ -18,7 +18,9 @@ if is_heat_enabled; then
elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
if is_service_enabled tempest; then if is_service_enabled tempest; then
setup_develop $TEMPEST_DIR if [[ "$INSTALL_TEMPEST" == "True" ]]; then
setup_develop $TEMPEST_DIR
fi
fi fi
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then

View File

@ -22,5 +22,5 @@ HEAT_PRIVATE_SUBNET_CIDR=10.0.5.0/24
source $TOP_DIR/openrc demo demo source $TOP_DIR/openrc demo demo
openstack network show heat-net || openstack network create heat-net openstack network show heat-net || openstack network create heat-net
openstack subnet show heat-subnet || openstack subnet create heat-subnet --network heat-net --subnet-range $HEAT_PRIVATE_SUBNET_CIDR subnet_id=$((openstack subnet show heat-subnet || openstack subnet create heat-subnet --network heat-net --subnet-range $HEAT_PRIVATE_SUBNET_CIDR) | grep " id " | awk '{print $4}')
openstack router add subnet router1 heat-subnet openstack router show router1 -c interfaces_info | grep -q $subnet_id || openstack router add subnet router1 $subnet_id