summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.zuul.yaml47
-rw-r--r--devstack/lib/heat6
-rwxr-xr-xdevstack/upgrade/resources.sh12
-rw-r--r--doc/source/getting_started/on_devstack.rst4
-rw-r--r--heat/engine/resources/openstack/heat/resource_group.py18
-rw-r--r--heat/engine/resources/openstack/nova/server_group.py10
-rw-r--r--heat/tests/openstack/nova/test_server_group.py35
-rwxr-xr-xheat_integrationtests/cleanup_test_env.sh2
-rw-r--r--heat_integrationtests/functional/test_resource_group.py54
-rwxr-xr-xheat_integrationtests/prepare_test_env.sh2
-rw-r--r--lower-constraints.txt162
-rw-r--r--requirements.txt4
-rw-r--r--roles/run-heat-tests/defaults/main.yaml3
-rw-r--r--roles/run-heat-tests/tasks/main.yaml23
-rw-r--r--tox.ini7
15 files changed, 187 insertions, 202 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index e1e1786d0..3d2ac4395 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -75,7 +75,7 @@
minimal_image_ref: ${DEFAULT_IMAGE_NAME:-cirros-0.3.6-x86_64-disk}
instance_type: m1.heat_int
minimal_instance_type: m1.heat_micro
- image_ref: Fedora-Cloud-Base-33-1.2.x86_64
+ image_ref: Fedora-Cloud-Base-36-1.5.x86_64
hidden_stack_tag: hidden
heat_config_notify_script: /opt/stack/heat-agents/heat-config/bin/heat-config-notify
boot_config_env: /opt/stack/heat-templates/hot/software-config/boot-config/test_image_env.yaml
@@ -134,13 +134,18 @@
HEAT_USE_MOD_WSGI: False
- job:
- name: grenade-heat
- parent: grenade
+ name: grenade-heat-multinode
+ parent: grenade-multinode
required-projects:
- opendev.org/openstack/heat
- opendev.org/openstack/heat-tempest-plugin
- opendev.org/openstack/python-heatclient
vars:
+ grenade_devstack_localrc:
+ shared:
+ HOST_TOPOLOGY: multinode
+ HOST_TOPOLOGY_ROLE: primary
+ HOST_TOPOLOGY_SUBNODES: "{{ hostvars['compute1']['nodepool']['public_ipv4'] }}"
configure_swap_size: 8192
devstack_services:
h-api: true
@@ -148,22 +153,40 @@
h-eng: true
heat: true
# We do run a list of tests after upgrade. This is just to bypass the req from parent.
- tempest_test_regex: ^heat_tempest_plugin\.tests\.functional\.test_nova_server_networks
+ tempest_test_regex: ^tempest\.api\.identity\.v3\.test_tokens
tox_envlist: all
devstack_plugins:
heat: https://opendev.org/openstack/heat
tempest_plugins:
- heat-tempest-plugin
-
-- job:
- name: grenade-heat-multinode
- parent: grenade-heat
- nodeset: openstack-two-node-bionic
+ group-vars:
+ subnode:
+ grenade_devstack_localrc:
+ shared:
+ HOST_TOPOLOGY: multinode
+ HOST_TOPOLOGY_ROLE: subnode
+ HOST_TOPOLOGY_SUBNODES: "{{ hostvars['compute1']['nodepool']['public_ipv4'] }}"
+ configure_swap_size: 8192
+ devstack_services:
+ h-api: true
+ h-api-cfn: true
+ h-eng: true
+ heat: true
+ # We do run a list of tests after upgrade. This is just to bypass the req from parent.
+ devstack_plugins:
+ heat: https://opendev.org/openstack/heat
+ irrelevant-files:
+ - ^.*\.rst$
+ - ^api-ref/.*$
+ - ^doc/.*$
+ - ^heat/locale/.*$
+ - ^heat/tests/.*$
+ - ^releasenotes/.*$
- project:
+ queue: heat
templates:
- openstack-cover-jobs
- - openstack-lower-constraints-jobs
- openstack-python3-victoria-jobs
- periodic-stable-jobs
- publish-openstack-docs-pti
@@ -171,15 +194,11 @@
- release-notes-jobs-python3
check:
jobs:
- - grenade-heat
- grenade-heat-multinode
- heat-functional
- heat-functional-legacy
- - heat-functional-non-apache
gate:
- queue: heat
jobs:
- - grenade-heat
- grenade-heat-multinode
- heat-functional
- heat-functional-legacy
diff --git a/devstack/lib/heat b/devstack/lib/heat
index c237d9610..65088482b 100644
--- a/devstack/lib/heat
+++ b/devstack/lib/heat
@@ -453,7 +453,7 @@ function configure_tempest_for_heat {
# Skip LoadBalancerv2Test as deprecated neutron-lbaas service is not enabled
iniset $TEMPEST_CONFIG heat_plugin skip_functional_test_list 'LoadBalancerv2Test, NotificationTest'
- openstack flavor show m1.heat_int || openstack flavor create m1.heat_int --ram 512 --disk 4
+ openstack flavor show m1.heat_int || openstack flavor create m1.heat_int --ram 512 --disk 10
openstack flavor show m1.heat_micro || openstack flavor create m1.heat_micro --ram 128 --disk 1
source $TOP_DIR/openrc demo demo
@@ -482,14 +482,14 @@ function configure_tempest_for_heat {
source /etc/ci/mirror_info.sh
fi
HEAT_TEST_FEDORA_IMAGE_UPSTREAM=https://download.fedoraproject.org/pub/fedora/linux
- HEAT_TEST_FEDORA_IMAGE_PATH=releases/33/Cloud/x86_64/images/Fedora-Cloud-Base-33-1.2.x86_64.qcow2
+ HEAT_TEST_FEDORA_IMAGE_PATH=releases/36/Cloud/x86_64/images/Fedora-Cloud-Base-36-1.5.x86_64.qcow2
if curl --output /dev/null --silent --head --fail "${NODEPOOL_FEDORA_MIRROR}/${HEAT_TEST_FEDORA_IMAGE_PATH}"; then
export HEAT_TEST_FEDORA_IMAGE="${NODEPOOL_FEDORA_MIRROR}/${HEAT_TEST_FEDORA_IMAGE_PATH}"
else
export HEAT_TEST_FEDORA_IMAGE="${HEAT_TEST_FEDORA_IMAGE_UPSTREAM}/${HEAT_TEST_FEDORA_IMAGE_PATH}"
fi
TOKEN=$(openstack token issue -c id -f value)
- local image_exists=$( openstack image list | grep "Fedora-Cloud-Base-33-1.2.x86_64" )
+ local image_exists=$( openstack image list | grep "Fedora-Cloud-Base-36-1.5.x86_64" )
if [[ -z $image_exists ]]; then
if is_service_enabled g-api; then
upload_image $HEAT_TEST_FEDORA_IMAGE $TOKEN
diff --git a/devstack/upgrade/resources.sh b/devstack/upgrade/resources.sh
index 1b7be42ee..3f00dce9d 100755
--- a/devstack/upgrade/resources.sh
+++ b/devstack/upgrade/resources.sh
@@ -64,7 +64,11 @@ function _run_heat_integrationtests {
# Run set of specified functional tests
UPGRADE_TESTS=upgrade_tests.list
_write_heat_integrationtests $UPGRADE_TESTS
-
+ export UPPER_CONSTRAINTS_FILE=$DEST/requirements/upper-constraints.txt
+ export TOX_CONSTRAINTS_FILE=$UPPER_CONSTRAINTS_FILE
+ export HEAT_TEMPEST_PLUGIN=$DEST/heat-tempest-plugin
+ sudo git config --system --add safe.directory $HEAT_TEMPEST_PLUGIN
+ tox -evenv-tempest -- pip install -c$UPPER_CONSTRAINTS_FILE $HEAT_TEMPEST_PLUGIN
tox -evenv-tempest -- stestr --test-path=$DEST/heat/heat_integrationtests --top-dir=$DEST/heat \
--group_regex='heat_tempest_plugin\.tests\.api\.test_heat_api[._]([^_]+)' \
run --whitelist-file $UPGRADE_TESTS
@@ -105,7 +109,7 @@ function create {
local stack_name='grenadine'
resource_save heat stack_name $stack_name
local loc=`dirname $BASH_SOURCE`
- heat stack-create -f $loc/templates/random_string.yaml $stack_name
+ openstack stack create -t $loc/templates/random_string.yaml $stack_name
}
function verify {
@@ -117,7 +121,7 @@ function verify {
fi
fi
stack_name=$(resource_get heat stack_name)
- heat stack-show $stack_name
+ openstack stack show $stack_name
# TODO(sirushtim): Create more granular checks for Heat.
}
@@ -129,7 +133,7 @@ function verify_noapi {
function destroy {
_heat_set_user
- heat stack-delete $(resource_get heat stack_name)
+ openstack stack delete -y $(resource_get heat stack_name)
source $TOP_DIR/openrc admin admin
local user_id=$(resource_get heat user_id)
diff --git a/doc/source/getting_started/on_devstack.rst b/doc/source/getting_started/on_devstack.rst
index 29581390d..64d607ab2 100644
--- a/doc/source/getting_started/on_devstack.rst
+++ b/doc/source/getting_started/on_devstack.rst
@@ -51,8 +51,8 @@ a VM image that heat can launch. To do that add the following to
`[[local|localrc]]` section of `local.conf`::
IMAGE_URL_SITE="https://download.fedoraproject.org"
- IMAGE_URL_PATH="/pub/fedora/linux/releases/33/Cloud/x86_64/images/"
- IMAGE_URL_FILE="Fedora-Cloud-Base-33-1.2.x86_64.qcow2"
+ IMAGE_URL_PATH="/pub/fedora/linux/releases/36/Cloud/x86_64/images/"
+ IMAGE_URL_FILE="Fedora-Cloud-Base-36-1.5.x86_64.qcow2"
IMAGE_URLS+=","$IMAGE_URL_SITE$IMAGE_URL_PATH$IMAGE_URL_FILE
URLs for any cloud image may be specified, but fedora images from F20 contain
diff --git a/heat/engine/resources/openstack/heat/resource_group.py b/heat/engine/resources/openstack/heat/resource_group.py
index d6fb46e5d..f9275c92d 100644
--- a/heat/engine/resources/openstack/heat/resource_group.py
+++ b/heat/engine/resources/openstack/heat/resource_group.py
@@ -15,6 +15,7 @@ import collections
import copy
import functools
import itertools
+import math
from oslo_log import log as logging
@@ -433,18 +434,18 @@ class ResourceGroup(stack_resource.StackResource):
return False
return True
- def _run_to_completion(self, template, timeout):
+ def _run_to_completion(self, template, timeout_mins):
updater = self.update_with_template(template, {},
- timeout)
+ timeout_mins)
while not super(ResourceGroup,
self).check_update_complete(updater):
yield
- def _run_update(self, total_capacity, max_updates, timeout):
+ def _run_update(self, total_capacity, max_updates, timeout_mins):
template = self._assemble_for_rolling_update(total_capacity,
max_updates)
- return self._run_to_completion(template, timeout)
+ return self._run_to_completion(template, timeout_mins)
def check_update_complete(self, checkers):
for checker in checkers:
@@ -770,13 +771,18 @@ class ResourceGroup(stack_resource.StackResource):
batches = list(self._get_batches(self.get_size(), curr_cap, batch_size,
min_in_service))
- update_timeout = self._update_timeout(len(batches), pause_sec)
+ update_timeout_secs = self._update_timeout(len(batches), pause_sec)
+
+ # NOTE(gibi) update_timeout is in seconds but the _run_update
+ # eventually calls StackResource.update_with_template that takes
+ # timeout in minutes so we need to convert here.
+ update_timeout_mins = math.ceil(update_timeout_secs / 60)
def tasks():
for index, (curr_cap, max_upd) in enumerate(batches):
yield scheduler.TaskRunner(self._run_update,
curr_cap, max_upd,
- update_timeout)
+ update_timeout_mins)
if index < (len(batches) - 1) and pause_sec > 0:
yield scheduler.TaskRunner(pause_between_batch, pause_sec)
diff --git a/heat/engine/resources/openstack/nova/server_group.py b/heat/engine/resources/openstack/nova/server_group.py
index abaa8c6b7..13f3897e9 100644
--- a/heat/engine/resources/openstack/nova/server_group.py
+++ b/heat/engine/resources/openstack/nova/server_group.py
@@ -78,6 +78,16 @@ class ServerGroup(resource.Resource):
policies=policies)
self.resource_id_set(server_group.id)
+ def needs_replace_failed(self):
+ if not self.resource_id:
+ return True
+
+ with self.client_plugin().ignore_not_found:
+ self._show_resource()
+ return False
+
+ return True
+
def physical_resource_name(self):
name = self.properties[self.NAME]
if name:
diff --git a/heat/tests/openstack/nova/test_server_group.py b/heat/tests/openstack/nova/test_server_group.py
index 0a1e682e0..71db096ec 100644
--- a/heat/tests/openstack/nova/test_server_group.py
+++ b/heat/tests/openstack/nova/test_server_group.py
@@ -14,6 +14,9 @@
import json
from unittest import mock
+from novaclient import exceptions
+from oslo_utils import excutils
+
from heat.common import template_format
from heat.engine import scheduler
from heat.tests import common
@@ -50,6 +53,20 @@ class NovaServerGroupTest(common.HeatTestCase):
# create mock clients and objects
nova = mock.MagicMock()
self.sg.client = mock.MagicMock(return_value=nova)
+
+ class FakeNovaPlugin(object):
+
+ @excutils.exception_filter
+ def ignore_not_found(self, ex):
+ if not isinstance(ex, exceptions.NotFound):
+ raise ex
+
+ def is_conflict(self, ex):
+ return False
+
+ self.patchobject(excutils.exception_filter, '__exit__')
+ self.patchobject(self.sg, 'client_plugin',
+ return_value=FakeNovaPlugin())
self.sg_mgr = nova.server_groups
def _create_sg(self, name):
@@ -99,3 +116,21 @@ class NovaServerGroupTest(common.HeatTestCase):
self.sg.client().server_groups = s_groups
self.assertEqual({'server_gr': 'info'}, self.sg.FnGetAtt('show'))
s_groups.get.assert_called_once_with('test')
+
+ def test_needs_replace_failed(self):
+ self._create_sg('test')
+ self.sg.state_set(self.sg.CREATE, self.sg.FAILED)
+ mock_show_resource = self.patchobject(self.sg, '_show_resource')
+ mock_show_resource.side_effect = [exceptions.NotFound(404), None]
+
+ self.sg.resource_id = None
+ self.assertTrue(self.sg.needs_replace_failed())
+ self.assertEqual(0, mock_show_resource.call_count)
+
+ self.sg.resource_id = 'sg_id'
+ self.assertTrue(self.sg.needs_replace_failed())
+ self.assertEqual(1, mock_show_resource.call_count)
+
+ mock_show_resource.return_value = None
+ self.assertFalse(self.sg.needs_replace_failed())
+ self.assertEqual(2, mock_show_resource.call_count)
diff --git a/heat_integrationtests/cleanup_test_env.sh b/heat_integrationtests/cleanup_test_env.sh
index 12791c9fd..8cc5fb1ce 100755
--- a/heat_integrationtests/cleanup_test_env.sh
+++ b/heat_integrationtests/cleanup_test_env.sh
@@ -30,4 +30,4 @@ openstack flavor delete m1.heat_int
openstack flavor delete m1.heat_micro
# delete the image created
-openstack image delete Fedora-Cloud-Base-33-1.2.x86_64
+openstack image delete Fedora-Cloud-Base-36-1.5.x86_64
diff --git a/heat_integrationtests/functional/test_resource_group.py b/heat_integrationtests/functional/test_resource_group.py
index ebce70df7..07be7f24c 100644
--- a/heat_integrationtests/functional/test_resource_group.py
+++ b/heat_integrationtests/functional/test_resource_group.py
@@ -129,6 +129,60 @@ resources:
outputs.append(validate_output(stack, 'random2', 30))
self.assertEqual(outputs, self._stack_output(stack, 'all_values'))
+ def test_create_nested_groups_with_timeout(self):
+ parent_template = '''
+heat_template_version: rocky
+resources:
+ parent_group:
+ type: OS::Heat::ResourceGroup
+ update_policy:
+ batch_create: { max_batch_size: 1, pause_time: 1 }
+ properties:
+ count: 2
+ resource_def:
+ type: child.yaml
+'''
+ child_template = '''
+heat_template_version: rocky
+resources:
+ child_group:
+ type: OS::Heat::ResourceGroup
+ update_policy:
+ batch_create: { max_batch_size: 1, pause_time: 1 }
+ properties:
+ count: 2
+ resource_def:
+ type: value.yaml
+'''
+ value_template = '''
+heat_template_version: rocky
+resources:
+ value:
+ type: OS::Heat::Value
+ properties:
+ type: string
+ value: 'test'
+'''
+ files = {
+ 'child.yaml': child_template,
+ 'value.yaml': value_template,
+ }
+ stack_identifier = self.stack_create(
+ template=parent_template,
+ files=files,
+ timeout=10, # in minutes
+ )
+
+ resources = self.client.resources.list(
+ stack_identifier, nested_depth=2, with_detail=True)
+ timeouts = set()
+ for res in resources:
+ if res.resource_type == "OS::Heat::ResourceGroup":
+ nested_stack = self.client.stacks.get(res.physical_resource_id)
+ timeouts.add(nested_stack.timeout_mins)
+
+ self.assertEqual({10}, timeouts)
+
def test_update_increase_decrease_count(self):
# create stack with resource group count 2
env = {'resource_registry':
diff --git a/heat_integrationtests/prepare_test_env.sh b/heat_integrationtests/prepare_test_env.sh
index 45b86e493..d4e440f73 100755
--- a/heat_integrationtests/prepare_test_env.sh
+++ b/heat_integrationtests/prepare_test_env.sh
@@ -46,7 +46,7 @@ function _config_iniset {
iniset $conf_file heat_plugin instance_type m1.heat_int
iniset $conf_file heat_plugin minimal_instance_type m1.heat_micro
- iniset $conf_file heat_plugin image_ref Fedora-Cloud-Base-33-1.2.x86_64
+ iniset $conf_file heat_plugin image_ref Fedora-Cloud-Base-36-1.5.x86_64
iniset $conf_file heat_plugin minimal_image_ref $default_image_name
iniset $conf_file heat_plugin hidden_stack_tag hidden
diff --git a/lower-constraints.txt b/lower-constraints.txt
deleted file mode 100644
index 5a766a06b..000000000
--- a/lower-constraints.txt
+++ /dev/null
@@ -1,162 +0,0 @@
-alembic==0.9.8
-amqp==2.6.0
-aodhclient==0.9.0
-appdirs==1.4.3
-asn1crypto==0.24.0
-Babel==2.3.4
-bandit==1.1.0
-bcrypt==3.1.4
-cachetools==2.0.1
-certifi==2018.1.18
-cffi==1.14.0
-chardet==3.0.4
-cliff==2.11.0
-cmd2==0.8.1
-contextlib2==0.5.5
-coverage==4.0
-croniter==0.3.4
-cryptography==2.5
-debtcollector==1.19.0
-decorator==4.3.0
-deprecation==2.0
-doc8==0.6.0
-docker-pycreds==0.2.2
-docker==3.1.1
-docutils==0.13.1
-dogpile.cache==0.6.5
-enum-compat==0.0.2
-eventlet==0.18.2
-extras==1.0.0
-fasteners==0.14.1
-fixtures==3.0.0
-flake8==3.7.0
-future==0.16.0
-futurist==1.6.0
-gitdb2==2.0.3
-GitPython==2.1.8
-greenlet==0.4.15
-idna==2.6
-iso8601==0.1.12
-Jinja2==2.10
-jmespath==0.9.3
-jsonpatch==1.21
-jsonpointer==2.0
-jsonschema==2.6.0
-keystoneauth1==3.18.0
-keystonemiddleware==4.17.0
-kombu==5.0.1
-linecache2==1.0.0
-lxml==4.5.0
-Mako==1.0.7
-MarkupSafe==1.1.1
-mccabe==0.6.0
-mock==3.0.3
-monotonic==1.4
-mox3==0.28.0
-msgpack==0.5.6
-msgpack-python==0.5.6
-munch==2.2.0
-netaddr==0.7.18
-netifaces==0.10.6
-neutron-lib==1.14.0
-openstacksdk==0.11.2
-os-client-config==1.29.0
-os-service-types==1.2.0
-osc-lib==1.10.0
-oslo.cache==1.26.0
-oslo.concurrency==3.26.0
-oslo.config==5.2.0
-oslo.context==2.19.2
-oslo.db==6.0.0
-oslo.i18n==3.15.3
-oslo.log==3.36.0
-oslo.messaging==5.29.0
-oslo.middleware==3.31.0
-oslo.policy==1.30.0
-oslo.reports==1.18.0
-oslo.serialization==2.18.0
-oslo.service==1.24.0
-oslo.upgradecheck==0.1.0
-oslo.utils==3.37.0
-oslo.versionedobjects==1.31.2
-oslotest==3.2.0
-osprofiler==1.4.0
-packaging==17.1
-paramiko==2.7.1
-Paste==2.0.3
-PasteDeploy==1.5.0
-pbr==2.0.0
-pika-pool==0.1.3
-pika==0.10.0
-ply==3.11
-prettytable==0.7.2
-psutil==5.4.3
-pyasn1==0.4.2
-pycadf==2.7.0
-pycparser==2.18
-Pygments==2.2.0
-pyinotify==0.9.6
-PyMySQL==0.8.0
-PyNaCl==1.2.1
-pyOpenSSL==17.5.0
-pyparsing==2.2.0
-pyperclip==1.6.0
-python-barbicanclient==4.5.2
-python-blazarclient===1.0.1
-python-ceilometerclient==2.5.0
-python-cinderclient==3.3.0
-python-dateutil==2.7.0
-python-designateclient==2.7.0
-python-editor==1.0.3
-python-glanceclient==2.8.0
-python-heatclient==1.10.0
-python-ironicclient==2.8.0
-python-keystoneclient==3.8.0
-python-magnumclient==2.3.0
-python-manilaclient==1.16.0
-python-mimeparse==1.6.0
-python-mistralclient==3.1.0
-python-monascaclient==1.12.0
-python-neutronclient==6.14.0
-python-novaclient==9.1.0
-python-octaviaclient==1.8.0
-python-openstackclient==3.12.0
-python-saharaclient==1.4.0
-python-subunit==1.2.0
-python-swiftclient==3.2.0
-python-troveclient==2.2.0
-python-vitrageclient==2.7.0
-python-zaqarclient==1.3.0
-python-zunclient==3.4.0
-pytz==2013.6
-PyYAML==3.13
-repoze.lru==0.7
-requests==2.14.2
-requestsexceptions==1.4.0
-rfc3986==1.1.0
-Routes==2.3.1
-simplejson==3.13.2
-six==1.10.0
-smmap2==2.0.3
-sqlalchemy-migrate==0.13.0
-SQLAlchemy==1.0.10
-sqlparse==0.2.4
-statsd==3.2.2
-stestr==2.0.0
-stevedore==3.1.0
-tempest==17.1.0
-Tempita==0.5.2
-tenacity==6.1.0
-testresources==2.0.0
-testscenarios==0.4
-testtools==2.2.0
-traceback2==1.4.0
-unittest2==1.1.0
-urllib3==1.22
-vine==1.1.4
-voluptuous==0.11.1
-warlock==1.2.0
-WebOb==1.7.1
-websocket-client==0.47.0
-wrapt==1.10.11
-yaql==1.1.3
diff --git a/requirements.txt b/requirements.txt
index 3bf25655e..5b1044fa9 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,7 @@
+# Requirements lower bounds listed here are our best effort to keep them up to
+# date but we do not test them so no guarantee of having them all correct. If
+# you find any incorrect lower bounds, let us know or propose a fix.
+
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
diff --git a/roles/run-heat-tests/defaults/main.yaml b/roles/run-heat-tests/defaults/main.yaml
index b601d49d9..22ce4a490 100644
--- a/roles/run-heat-tests/defaults/main.yaml
+++ b/roles/run-heat-tests/defaults/main.yaml
@@ -1,2 +1,5 @@
devstack_base_dir: /opt/stack
tempest_test_timeout: ''
+tempest_tox_environment: {}
+heat_tempest_plugin: /opt/stack/heat-tempest-plugin
+constraints_file: /opt/stack/requirements/upper-constraints.txt
diff --git a/roles/run-heat-tests/tasks/main.yaml b/roles/run-heat-tests/tasks/main.yaml
index 75122f2a1..4af1d0e03 100644
--- a/roles/run-heat-tests/tasks/main.yaml
+++ b/roles/run-heat-tests/tasks/main.yaml
@@ -1,3 +1,23 @@
+- name: Set OS_TEST_TIMEOUT if requested
+ set_fact:
+ tempest_tox_environment: "{{ tempest_tox_environment | combine({'OS_TEST_TIMEOUT': tempest_test_timeout}) }}"
+ when: tempest_test_timeout != ''
+
+- name: Set TOX_CONSTRAINTS_FILE
+ set_fact:
+ tempest_tox_environment: "{{ tempest_tox_environment | combine({'UPPER_CONSTRAINTS_FILE': constraints_file}) | combine({'TOX_CONSTRAINTS_FILE': constraints_file}) }}"
+
+- name: Allow git to read plugin directories
+ become: true
+ command: git config --system --add safe.directory {{heat_tempest_plugin}}
+
+- name: Install plugins
+ command: tox -evenv-tempest -- pip install -c{{constraints_file}} {{heat_tempest_plugin}}
+ become: true
+ args:
+ chdir: "{{devstack_base_dir}}/tempest"
+ environment: "{{ tempest_tox_environment }}"
+
- name: Run heat tests
command: tox -evenv-tempest -- stestr --test-path={{devstack_base_dir}}/heat/heat_integrationtests \
--top-dir={{devstack_base_dir}}/heat \
@@ -5,5 +25,4 @@
args:
chdir: "{{devstack_base_dir}}/tempest"
become: true
- become_user: tempest
- environment: '{{ {"OS_TEST_TIMEOUT": tempest_test_timeout} if tempest_test_timeout else {} }}'
+ environment: "{{ tempest_tox_environment }}"
diff --git a/tox.ini b/tox.ini
index 034ab2d4a..5d37af396 100644
--- a/tox.ini
+++ b/tox.ini
@@ -151,10 +151,3 @@ commands =
deps = bindep
commands = bindep test
usedevelop = False
-
-[testenv:lower-constraints]
-install_command = pip install {opts} {packages}
-deps =
- -c{toxinidir}/lower-constraints.txt
- -r{toxinidir}/test-requirements.txt
- -r{toxinidir}/requirements.txt