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/common/environment_util.py36
-rw-r--r--heat/tests/test_common_env_util.py23
-rwxr-xr-xheat_integrationtests/cleanup_test_env.sh2
-rwxr-xr-xheat_integrationtests/prepare_test_env.sh2
-rw-r--r--lower-constraints.txt163
-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
13 files changed, 83 insertions, 201 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index ce34d9e57..98a05dd2f 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
@@ -153,7 +153,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
@@ -186,7 +186,6 @@
- project:
templates:
- openstack-cover-jobs
- - openstack-lower-constraints-jobs
- openstack-python3-xena-jobs
- openstack-python3-xena-jobs-arm64
- periodic-stable-jobs
diff --git a/devstack/lib/heat b/devstack/lib/heat
index 5f5f17252..e981d23ff 100644
--- a/devstack/lib/heat
+++ b/devstack/lib/heat
@@ -449,7 +449,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
@@ -478,14 +478,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/common/environment_util.py b/heat/common/environment_util.py
index 8a6ed4393..490802830 100644
--- a/heat/common/environment_util.py
+++ b/heat/common/environment_util.py
@@ -12,6 +12,7 @@
# under the License.
import collections
+from oslo_log import log as logging
from oslo_serialization import jsonutils
from heat.common import environment_format as env_fmt
@@ -21,15 +22,22 @@ from heat.common.i18n import _
ALLOWED_PARAM_MERGE_STRATEGIES = (OVERWRITE, MERGE, DEEP_MERGE) = (
'overwrite', 'merge', 'deep_merge')
+LOG = logging.getLogger(__name__)
-def get_param_merge_strategy(merge_strategies, param_key):
+
+def get_param_merge_strategy(merge_strategies, param_key,
+ available_strategies=None):
+ if not available_strategies:
+ available_strategies = {}
if merge_strategies is None:
return OVERWRITE
env_default = merge_strategies.get('default', OVERWRITE)
+ merge_strategy = merge_strategies.get(
+ param_key, available_strategies.get(
+ param_key, env_default))
- merge_strategy = merge_strategies.get(param_key, env_default)
if merge_strategy in ALLOWED_PARAM_MERGE_STRATEGIES:
return merge_strategy
@@ -105,34 +113,39 @@ def merge_parameters(old, new, param_schemata, strategies_in_file,
raise exception.InvalidMergeStrategyForParam(strategy=MERGE,
param=p_key)
- new_strategies = {}
-
- if not old:
- return new, new_strategies
-
for key, value in new.items():
# if key not in param_schemata ignore it
if key in param_schemata and value is not None:
param_merge_strategy = get_param_merge_strategy(
- strategies_in_file, key)
+ strategies_in_file, key, available_strategies)
if key not in available_strategies:
- new_strategies[key] = param_merge_strategy
+ available_strategies[key] = param_merge_strategy
elif param_merge_strategy != available_strategies[key]:
raise exception.ConflictingMergeStrategyForParam(
strategy=param_merge_strategy,
param=key, env_file=env_file)
+ if not old:
+ return new
+
+ for key, value in new.items():
+ # if key not in param_schemata ignore it
+ if key in param_schemata and value is not None:
+ param_merge_strategy = available_strategies[key]
if param_merge_strategy == DEEP_MERGE:
+ LOG.debug("Deep Merging Parameter: %s", key)
param_merge(key, value,
param_schemata[key],
deep_merge=True)
elif param_merge_strategy == MERGE:
+ LOG.debug("Merging Parameter: %s", key)
param_merge(key, value, param_schemata[key])
else:
+ LOG.debug("Overriding Parameter: %s", key)
old[key] = value
- return old, new_strategies
+ return old
def merge_environments(environment_files, files,
@@ -170,11 +183,10 @@ def merge_environments(environment_files, files,
if section_value:
if section_key in (env_fmt.PARAMETERS,
env_fmt.PARAMETER_DEFAULTS):
- params[section_key], new_strategies = merge_parameters(
+ params[section_key] = merge_parameters(
params[section_key], section_value,
param_schemata, strategies_in_file,
available_strategies, filename)
- available_strategies.update(new_strategies)
else:
params[section_key] = merge_map(params[section_key],
section_value)
diff --git a/heat/tests/test_common_env_util.py b/heat/tests/test_common_env_util.py
index dff4c9c3d..07e077098 100644
--- a/heat/tests/test_common_env_util.py
+++ b/heat/tests/test_common_env_util.py
@@ -135,7 +135,7 @@ class TestMergeEnvironments(common.HeatTestCase):
def test_merge_envs_with_specified_default(self):
merge_strategies = {'default': 'deep_merge'}
- self.env_2['parameter_merge_strategies'] = merge_strategies
+ self.env_1['parameter_merge_strategies'] = merge_strategies
files = {'env_1': json.dumps(self.env_1),
'env_2': json.dumps(self.env_2)}
environment_files = ['env_1', 'env_2']
@@ -169,7 +169,7 @@ class TestMergeEnvironments(common.HeatTestCase):
'lst_value2': 'merge',
'json_value1': 'deep_merge'}
- self.env_2['parameter_merge_strategies'] = merge_strategies
+ self.env_1['parameter_merge_strategies'] = merge_strategies
files = {'env_1': json.dumps(self.env_1),
'env_2': json.dumps(self.env_2)}
@@ -202,7 +202,13 @@ class TestMergeEnvironments(common.HeatTestCase):
'lst_value1': "merge",
'json_value1': "deep_merge"}
- self.env_2['parameter_merge_strategies'] = merge_strategies
+ env3_merge_strategies = {
+ 'default': "overwrite",
+ 'lst_value1': "deep_merge",
+ 'json_value1': "merge"}
+
+ self.env_1['parameter_merge_strategies'] = merge_strategies
+ self.env_3['parameter_merge_strategies'] = env3_merge_strategies
files = {'env_1': json.dumps(self.env_1),
'env_2': json.dumps(self.env_2),
@@ -221,7 +227,12 @@ class TestMergeEnvironments(common.HeatTestCase):
'default': "overwrite",
'lst_value2': "merge"}
- self.env_2['parameter_merge_strategies'] = merge_strategies
+ env4_merge_strategies = {
+ 'default': "overwrite",
+ 'lst_value2': "overwrite"}
+
+ self.env_1['parameter_merge_strategies'] = merge_strategies
+ self.env_4['parameter_merge_strategies'] = env4_merge_strategies
files = {'env_1': json.dumps(self.env_1),
'env_2': json.dumps(self.env_2),
@@ -264,9 +275,9 @@ class TestMergeEnvironments(common.HeatTestCase):
self.assertEqual({'value1': 0}, self.params['parameter_defaults'])
def test_merge_envs_with_zeros_in_maps(self):
- env1 = {'parameter_defaults': {'value1': {'foo': 1}}}
- env2 = {'parameter_defaults': {'value1': {'foo': 0}},
+ env1 = {'parameter_defaults': {'value1': {'foo': 1}},
'parameter_merge_strategies': {'value1': 'deep_merge'}}
+ env2 = {'parameter_defaults': {'value1': {'foo': 0}}}
files = {'env_1': json.dumps(env1),
'env_2': json.dumps(env2)}
environment_files = ['env_1', 'env_2']
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 25c90e155..000000000
--- a/lower-constraints.txt
+++ /dev/null
@@ -1,163 +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
-ddt==1.4.1
-debtcollector==1.19.0
-decorator==4.3.0
-deprecation==2.0
-doc8==0.8.1
-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.17
-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==5.1.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==6.8.0
-oslo.context==2.22.0
-oslo.db==6.0.0
-oslo.i18n==3.20.0
-oslo.log==4.3.0
-oslo.messaging==5.29.0
-oslo.middleware==3.31.0
-oslo.policy==3.7.0
-oslo.reports==1.18.0
-oslo.serialization==2.25.0
-oslo.service==1.24.0
-oslo.upgradecheck==1.3.0
-oslo.utils==4.5.0
-oslo.versionedobjects==1.31.2
-oslotest==3.2.0
-osprofiler==1.4.0
-packaging==20.4
-paramiko==2.7.1
-Paste==2.0.3
-PasteDeploy==1.5.0
-pbr==3.1.1
-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==5.1
-repoze.lru==0.7
-requests==2.23.0
-requestsexceptions==1.4.0
-rfc3986==1.2.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 2f54c37aa..29ca4b36a 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 eb87effa2..07232014d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -153,10 +153,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