summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.zuul.yaml5
-rw-r--r--devstack/lib/heat6
-rwxr-xr-xdevstack/upgrade/resources.sh6
-rw-r--r--doc/source/getting_started/on_devstack.rst4
-rw-r--r--heat/engine/resources/openstack/nova/server.py58
-rw-r--r--heat/engine/stack.py5
-rw-r--r--heat/tests/openstack/nova/test_server.py145
-rw-r--r--heat/tests/test_convg_stack.py27
-rwxr-xr-xheat_integrationtests/cleanup_test_env.sh2
-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, 199 insertions, 260 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index aa0ccf2f7..60b3ff1dc 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
@@ -149,7 +149,7 @@
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
@@ -159,7 +159,6 @@
- project:
templates:
- openstack-cover-jobs
- - openstack-lower-constraints-jobs
- openstack-python3-victoria-jobs
- periodic-stable-jobs
- publish-openstack-docs-pti
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..4e7c26e16 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
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/nova/server.py b/heat/engine/resources/openstack/nova/server.py
index 0302514d9..7081c78c9 100644
--- a/heat/engine/resources/openstack/nova/server.py
+++ b/heat/engine/resources/openstack/nova/server.py
@@ -12,6 +12,7 @@
# under the License.
import copy
+import ipaddress
from oslo_config import cfg
from oslo_log import log as logging
@@ -955,8 +956,8 @@ class Server(server_base.BaseServer, sh.SchedulerHintsMixin,
return result
def _get_live_networks(self, server, props):
- reality_nets = self._add_attrs_for_address(server,
- extend_networks=False)
+ reality_nets = self._get_server_addresses(server,
+ extend_networks=False)
reality_net_ids = {}
client_plugin = self.client_plugin('neutron')
for net_key in reality_nets:
@@ -1124,7 +1125,7 @@ class Server(server_base.BaseServer, sh.SchedulerHintsMixin,
LOG.warning("Failed to fetch resource attributes: %s", ex)
return
- def _add_attrs_for_address(self, server, extend_networks=True):
+ def _get_server_addresses(self, server, extend_networks=True):
"""Adds port id, subnets and network attributes to addresses list.
This method is used only for resolving attributes.
@@ -1133,31 +1134,48 @@ class Server(server_base.BaseServer, sh.SchedulerHintsMixin,
the net is returned without replacing name on
id.
"""
- nets = copy.deepcopy(server.addresses) or {}
- ifaces = server.interface_list()
- ip_mac_mapping_on_port_id = dict(((iface.fixed_ips[0]['ip_address'],
- iface.mac_addr), iface.port_id)
- for iface in ifaces)
- for net_name in nets:
- for addr in nets[net_name]:
- addr['port'] = ip_mac_mapping_on_port_id.get(
- (addr['addr'], addr['OS-EXT-IPS-MAC:mac_addr']))
+ nets = {}
+ ifaces = self.client('neutron').list_ports(device_id=server.id)
+ for port in ifaces['ports']:
+ net_label = self.client('neutron').list_networks(
+ id=port['network_id'])['networks'][0]['name']
+ net = nets.setdefault(net_label, [])
+ for fixed_ip in port['fixed_ips']:
+ addr = {'addr': fixed_ip.get('ip_address'),
+ 'OS-EXT-IPS-MAC:mac_addr': port['mac_address'],
+ 'OS-EXT-IPS:type': 'fixed',
+ 'port': port['id']}
+
+ try:
+ addr['version'] = ipaddress.ip_address(
+ addr['addr']).version,
+ except ValueError:
+ addr['version'] = None
+
+ if addr['addr']:
+ fips = self.client('neutron').list_floatingips(
+ fixed_ip_address=addr['addr'])
+ for fip in fips['floatingips']:
+ net.append({
+ 'addr': fip['floating_ip_address'],
+ 'version': addr['version'],
+ 'OS-EXT-IPS-MAC:mac_addr': port['mac_address'],
+ 'OS-EXT-IPS:type': 'floating',
+ 'port': None})
+
# _get_live_networks() uses this method to get reality_nets.
# We don't need to get subnets and network in that case. Only
# do the external calls if extend_networks is true, i.e called
# from _resolve_attribute()
if not extend_networks:
+ net.append(addr)
continue
- try:
- port = self.client('neutron').show_port(
- addr['port'])['port']
- except Exception as ex:
- addr['subnets'], addr['network'] = None, None
- LOG.warning("Failed to fetch resource attributes: %s", ex)
- continue
+
addr['subnets'] = self._get_subnets_attr(port['fixed_ips'])
addr['network'] = self._get_network_attr(port['network_id'])
+ net.append(addr)
+
if extend_networks:
return self._extend_networks(nets)
else:
@@ -1201,7 +1219,7 @@ class Server(server_base.BaseServer, sh.SchedulerHintsMixin,
self.client_plugin().ignore_not_found(e)
return ''
if name == self.ADDRESSES:
- return self._add_attrs_for_address(server)
+ return self._get_server_addresses(server)
if name == self.NETWORKS_ATTR:
return self._extend_networks(server.networks)
if name == self.INSTANCE_NAME:
diff --git a/heat/engine/stack.py b/heat/engine/stack.py
index be3323b8b..33b0d268a 100644
--- a/heat/engine/stack.py
+++ b/heat/engine/stack.py
@@ -1495,7 +1495,10 @@ class Stack(collections.Mapping):
# Rolling back to previous resource
score += 10
- return score, ext_rsrc.updated_at
+ last_changed_at = ext_rsrc.updated_at
+ if last_changed_at is None:
+ last_changed_at = ext_rsrc.created_at
+ return score, last_changed_at
candidates = sorted((r for r in self.ext_rsrcs_db.values()
if r.name == rsrc_name),
diff --git a/heat/tests/openstack/nova/test_server.py b/heat/tests/openstack/nova/test_server.py
index 47ab98963..42c40b57b 100644
--- a/heat/tests/openstack/nova/test_server.py
+++ b/heat/tests/openstack/nova/test_server.py
@@ -446,42 +446,48 @@ class ServersTest(common.HeatTestCase):
ip='5.6.9.8'),
create_fake_iface(port='1013',
mac='fa:16:3e:8c:44:cc',
- ip='10.13.12.13')]
+ ip='10.13.12.13',
+ subnet='private_subnet_id')]
+ ports = [dict(id=interfaces[0].port_id,
+ mac_address=interfaces[0].mac_addr,
+ fixed_ips=interfaces[0].fixed_ips,
+ network_id='public_id'),
+ dict(id=interfaces[1].port_id,
+ mac_address=interfaces[1].mac_addr,
+ fixed_ips=interfaces[1].fixed_ips,
+ network_id='public_id'),
+ dict(id=interfaces[2].port_id,
+ mac_address=interfaces[2].mac_addr,
+ fixed_ips=interfaces[2].fixed_ips,
+ network_id='private_id')]
+ public_net = dict(id='public_id',
+ name='public',
+ mtu=1500,
+ subnets=['public_subnet_id'])
+ private_net = dict(id='private_id',
+ name='private',
+ mtu=1500,
+ subnets=['private_subnet_id'])
+ private_subnet = dict(id='private_subnet_id',
+ name='private_subnet',
+ cidr='private_cidr',
+ allocation_pools=[{'start': 'start_addr',
+ 'end': 'end_addr'}],
+ gateway_ip='private_gateway',
+ network_id='private_id')
self.patchobject(self.fc.servers, 'get', return_value=return_server)
- self.patchobject(return_server, 'interface_list',
- return_value=interfaces)
+ self.patchobject(neutronclient.Client, 'list_ports',
+ return_value={'ports': ports})
+ self.patchobject(neutronclient.Client, 'list_networks',
+ side_effect=[{'networks': [public_net]},
+ {'networks': [public_net]},
+ {'networks': [private_net]}])
+ self.patchobject(neutronclient.Client, 'list_floatingips',
+ return_value={'floatingips': []})
self.patchobject(self.fc.servers, 'tag_list', return_value=['test'])
-
- self.port_show.return_value = {
- 'port': {'id': '1234',
- 'network_id': 'the_network',
- 'fixed_ips': [{
- 'ip_address': '4.5.6.7',
- 'subnet_id': 'the_subnet'}]
- }
- }
- subnet_dict = {
- 'subnet': {
- 'name': 'subnet_name',
- 'cidr': '10.0.0.0/24',
- 'allocation_pools': [{'start': '10.0.0.2',
- 'end': u'10.0.0.254'}],
- 'gateway_ip': '10.0.0.1',
- 'id': 'the_subnet',
- 'network_id': 'the_network'
- }
- }
- network_dict = {
- 'network': {
- 'name': 'network_name',
- 'mtu': 1500,
- 'subnets': [subnet_dict['subnet']['id']],
- 'id': 'the_network'
- }
- }
- self.subnet_show.return_value = subnet_dict
- self.network_show.return_value = network_dict
+ self.subnet_show.return_value = {'subnet': private_subnet}
+ self.network_show.return_value = {'network': private_net}
public_ip = return_server.networks['public'][0]
self.assertEqual('1234',
@@ -498,9 +504,9 @@ class ServersTest(common.HeatTestCase):
server.FnGetAtt('addresses')['private'][0]['port'])
self.assertEqual(private_ip,
server.FnGetAtt('addresses')['private'][0]['addr'])
- self.assertEqual([subnet_dict['subnet']],
+ self.assertEqual([private_subnet],
server.FnGetAtt('addresses')['private'][0]['subnets'])
- self.assertEqual(network_dict['network'],
+ self.assertEqual(private_net,
server.FnGetAtt('addresses')['private'][0]['network'])
self.assertEqual(private_ip,
server.FnGetAtt('networks')['private'][0])
@@ -521,21 +527,6 @@ class ServersTest(common.HeatTestCase):
self.assertIsNone(server.FnGetAtt('tags'))
self.assertEqual({}, server.FnGetAtt('os_collect_config'))
- def test_server_network_subnet_address_attr_port_not_found(self):
- return_server = self.fc.servers.list()[1]
- server_name = 'network-subnet-attr-server'
- server = self._create_test_server(return_server, server_name)
- interfaces = [create_fake_iface(port='1234',
- mac='fa:16:3e:8c:22:aa',
- ip='4.5.6.7')]
- self.patchobject(return_server, 'interface_list',
- return_value=interfaces)
- self.port_show.side_effect = neutron.exceptions.NotFound()
- self.assertEqual(None,
- server.FnGetAtt('addresses')['private'][0]['subnets'])
- self.assertEqual(None,
- server.FnGetAtt('addresses')['private'][0]['network'])
-
def test_server_create_metadata(self):
stack_name = 'create_metadata_test_stack'
self.patchobject(nova.NovaClientPlugin, 'client',
@@ -642,10 +633,30 @@ class ServersTest(common.HeatTestCase):
create_fake_iface(port='1013',
mac='fa:16:3e:8c:44:cc',
ip='10.13.12.13')]
+ ports = [dict(id=interfaces[0].port_id,
+ mac_address=interfaces[0].mac_addr,
+ fixed_ips=interfaces[0].fixed_ips,
+ network_id='public_id'),
+ dict(id=interfaces[1].port_id,
+ mac_address=interfaces[1].mac_addr,
+ fixed_ips=interfaces[1].fixed_ips,
+ network_id='public_id'),
+ dict(id=interfaces[2].port_id,
+ mac_address=interfaces[2].mac_addr,
+ fixed_ips=interfaces[2].fixed_ips,
+ network_id='private_id')]
+ public_net = dict(id='public_id', name='public')
+ private_net = dict(id='private_id', name='private')
self.patchobject(self.fc.servers, 'get', return_value=return_server)
- self.patchobject(return_server, 'interface_list',
- return_value=interfaces)
+ self.patchobject(neutronclient.Client, 'list_ports',
+ return_value={'ports': ports})
+ self.patchobject(neutronclient.Client, 'list_networks',
+ side_effect=[{'networks': [public_net]},
+ {'networks': [public_net]},
+ {'networks': [private_net]}])
+ self.patchobject(neutronclient.Client, 'list_floatingips',
+ return_value={'floatingips': []})
self.patchobject(return_server, 'interface_detach')
self.patchobject(return_server, 'interface_attach')
@@ -2038,20 +2049,42 @@ class ServersTest(common.HeatTestCase):
server.properties.data['networks'] = [{'network': 'public_id',
'fixed_ip': '5.6.9.8'}]
+ public_net = dict(id='public_id', name='public')
+ private_net = dict(id='private_id', name='private')
iface0 = create_fake_iface(port='aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa',
net='public',
ip='5.6.9.8',
mac='fa:16:3e:8c:33:aa')
+ port0 = dict(id=iface0.port_id,
+ network_id=iface0.net_id,
+ mac_address=iface0.mac_addr,
+ fixed_ips=iface0.fixed_ips)
iface1 = create_fake_iface(port='bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb',
net='public',
ip='4.5.6.7',
mac='fa:16:3e:8c:22:aa')
+ port1 = dict(id=iface1.port_id,
+ network_id=iface1.net_id,
+ mac_address=iface1.mac_addr,
+ fixed_ips=iface1.fixed_ips)
iface2 = create_fake_iface(port='cccccccc-cccc-cccc-cccc-cccccccccccc',
net='private',
ip='10.13.12.13',
mac='fa:16:3e:8c:44:cc')
+ port2 = dict(id=iface2.port_id,
+ network_id=iface2.net_id,
+ mac_address=iface2.mac_addr,
+ fixed_ips=iface2.fixed_ips)
self.patchobject(return_server, 'interface_list',
return_value=[iface0, iface1, iface2])
+ self.patchobject(neutronclient.Client, 'list_ports',
+ return_value={'ports': [port0, port1, port2]})
+ self.patchobject(neutronclient.Client, 'list_networks',
+ side_effect=[{'networks': [public_net]},
+ {'networks': [public_net]},
+ {'networks': [private_net]}])
+ self.patchobject(neutronclient.Client, 'list_floatingips',
+ return_value={'floatingips': []})
self.patchobject(neutron.NeutronClientPlugin,
'find_resourceid_by_name_or_id',
@@ -2674,6 +2707,14 @@ class ServersTest(common.HeatTestCase):
self.patchobject(neutron.NeutronClientPlugin,
'find_resourceid_by_name_or_id',
return_value=None)
+ self.patchobject(neutronclient.Client, 'list_ports',
+ return_value={'ports': [{'id': 'p_id',
+ 'name': 'p_name',
+ 'fixed_ips': [],
+ 'network_id': 'n_id'}]})
+ self.patchobject(neutronclient.Client, 'list_networks',
+ return_value={'networks': [{'id': 'n_id',
+ 'name': 'empty_net'}]})
self.patchobject(self.fc.servers, 'get', return_value=return_server)
self.patchobject(return_server, 'interface_list', return_value=[])
mock_detach = self.patchobject(return_server, 'interface_detach')
diff --git a/heat/tests/test_convg_stack.py b/heat/tests/test_convg_stack.py
index 0db119781..c001af1e0 100644
--- a/heat/tests/test_convg_stack.py
+++ b/heat/tests/test_convg_stack.py
@@ -11,6 +11,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+from datetime import datetime
+from datetime import timedelta
from unittest import mock
from oslo_config import cfg
@@ -429,22 +431,32 @@ class StackConvergenceCreateUpdateDeleteTest(common.HeatTestCase):
stack.prev_raw_template_id = 2
stack.t.id = 3
- def db_resource(current_template_id):
+ def db_resource(current_template_id,
+ created_at=None,
+ updated_at=None):
db_res = resource_objects.Resource(stack.context)
db_res['id'] = current_template_id
db_res['name'] = 'A'
db_res['current_template_id'] = current_template_id
- db_res['action'] = 'CREATE'
+ db_res['action'] = 'UPDATE' if updated_at else 'CREATE'
db_res['status'] = 'COMPLETE'
- db_res['updated_at'] = None
+ db_res['updated_at'] = updated_at
+ db_res['created_at'] = created_at
db_res['replaced_by'] = None
return db_res
+ start_time = datetime.utcfromtimestamp(0)
+
+ def t(minutes):
+ return start_time + timedelta(minutes=minutes)
+
a_res_2 = db_resource(2)
a_res_3 = db_resource(3)
- a_res_1 = db_resource(1)
+ a_res_0 = db_resource(0, created_at=t(0), updated_at=t(1))
+ a_res_1 = db_resource(1, created_at=t(2))
existing_res = {a_res_2.id: a_res_2,
a_res_3.id: a_res_3,
+ a_res_0.id: a_res_0,
a_res_1.id: a_res_1}
stack.ext_rsrcs_db = existing_res
best_res = stack._get_best_existing_rsrc_db('A')
@@ -460,9 +472,14 @@ class StackConvergenceCreateUpdateDeleteTest(common.HeatTestCase):
# no resource with current template id as 3 or 2
del existing_res[2]
best_res = stack._get_best_existing_rsrc_db('A')
- # should return resource with template id 1 existing in DB
+ # should return resource with template id 1 which is the newest
self.assertEqual(a_res_1.id, best_res.id)
+ del existing_res[1]
+ best_res = stack._get_best_existing_rsrc_db('A')
+ # should return resource with template id 0 existing in the db
+ self.assertEqual(a_res_0.id, best_res.id)
+
@mock.patch.object(parser.Stack, '_converge_create_or_update')
def test_updated_time_stack_create(self, mock_ccu, mock_cr):
stack = parser.Stack(utils.dummy_context(), 'convg_updated_time_test',
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/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