tox now hard fails if there is mismatch in spec
attributes[1]. This works around the issue
temporarily. We probably have to drop py38 jobs
and specify basepython for py39 target in the
future.
[1] https://github.com/tox-dev/tox/pull/2824/
Closes-Bug: #2002035
Change-Id: I4256a51afd011048eaaaf5d3c225ab36f75708ed
Looks like tox-extra plugin breaks openstack-tox*
jobs. Not sure if this is regression. I don't see
it being used in any other openstack projects.
Let's drop it.
Also cleans up things in setup.py.
Closes-Bug: #1998074
Change-Id: I154bfc36cc56f6b5425ec6bf805a290973203ba1
It's recommend to use this way. With tox is not really necessary to do
it but it can be good to use it. See this article[1], For example python -m pip executes pip using the Python interpreter you specified as python.
[1] https://snarky.ca/why-you-should-use-python-m-pip/
Change-Id: Ie4be214cce624bc73b8d6661ed459becb418ffa0
In some environment the containers' tag isn't modified (think
"latest"). This is already supported during deployment so we re-use
the code during update.
We also make sure that the same mechanism is available for
ovn_controller update. It can be selectively disable if one pass:
--skip-tags ovn_image
to the external-update run command.
We remove the ignore error as it's wrong indication that we are not
taking errors into account in those tasks. We also adjust the
delay as it's 3 seconds by default making the time we check longer
than the async tasks. Eventually, we add a new parameter for
controlling the downloading of the image
"OVNControllerImageUpdateTimeout" which is set to 10min by default.
Note that in order to pass CI, we need to modify the tht syntax test:
- ensure containers.podman collection is installed;
- ensure custom tripleo-ansible filter are found;
- make sure tripleo_role_name is defined in the syntax test playbook.
Change-Id: I6d439367816d5f5968b8f890f74b7a2f74715f52
openstack-tox-tht is currently failing with "ModuleNotFoundError:
No module named 'testtools' more details in Closes-Bug.
With this patch adding test-requirements.txt in tox-tht deps
as python testtool is already available in test-requirements.
Closes-Bug: #1980552
Change-Id: I46a0e58b2d6db08127de4b55a75f95ffa2b678ee
ansible.builtin.debug is redirected to ansible.posix.debug.
We need to install the collection explicitly.
This needs to be fixed for stdout callback plugin related changes
in ansible-runner >=2.2.0.
Also, increases ansible verbosity to track these issues better in
the future.
Closes-Bug: #1971703
Change-Id: Ibe883e19c25926ab302db741afae70821209a350
When using nic paritioning feature, the VFs used
by host has to be excluded from passthrough
whitelist. Added support to the derive pci script
to support pci address as string or dict format.
Specifying product_id, vendor_id is also allowed.
Added test cases for the derive pci script.
Change-Id: I35b3fe177f08214d06e20334e08be9bfe06f16d1
By ensuring the locale is set to US utf-8 we can avoid
encoding errors.
Closes-Bug: #1940313
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I42b45b5f0ccb4746c83da20cf5be7ef3066a861a
Currently yaml validation is executed against almost all .yaml files
in tht repo, but this makes releasenote files and zuul job definitions
tested by yaml-validate.py.
This patch addes the new --skip-dir option to yaml-validate.py and
exclude these directories (and .tox which was already excluded) so that
we can ignore files which are not valid deployment templates.
Change-Id: If6fce493151ef17bfba26f8b80fc267d09408a9b
- enable run of ansible-lint, with a temporary set of excludes
- fixes two problems reported by ansible-linter
Change-Id: Ibbe23db8fd5ac1008109f50f514df96686b0fa19
Bug: #1921409
- fixed bindep to allow execution under fedora
- fixed flake8 config to use officially recommended use patterns
- assured that git does not report dirty after running tox (both
pep8 and tht environments where breaking this by creating untracked
files). tox-extra plugin addition will prevent future regressions.
Change-Id: I4137056853f8c5f1c2304bfb6ec1188a82b12130
Bug: #1921409
- Use version agnostic "py" inside tox default envs
- Enable py39 testing jobs (new template contains them)
- Address deprecation warning in setup.cfg regarding use of dashes
instead of underlines (avoid future breakage with setuptools)
Change-Id: I26be50e029393e01db6718a21ac67d669ccd2e0c
We need to specify doc requirements in doc/requirements.txt
to avoid problems with the pip resolver [1] for the release team [2][3].
Removed specific doc requirements from test-requirements.txt.
The problem here is that this repos haven't doc/requirements.txt file
and by default in this case zuul will use the test-requirements.txt file
to
pull requirements [4].
This requirements file contains extra requirements like flake8 that
collided with those allowed in our job environment and so the new pip
resolver fails to install these requirements and the job exits in error.
This project meet the conditions leading to the bug.
/!\/!\/!\
Notice that I voluntarily added the doc directory even if no docs
are generated here because zuul will try to pull this requirements from
there first and the contained requirements are needed for reno but AFAIK
the releasenotes dir is ignored by zuul. c.f [4] for further details.
/!\/!\/!\
[1] http://lists.openstack.org/pipermail/release-job-failures/2021-January/001500.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019611.html
[3] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019612.html
[4] https://opendev.org/zuul/zuul-jobs/src/branch/master/roles/ensure-sphinx/tasks/main.yaml#L36
Change-Id: I519ef389448acb3dde328a0e61c074e48d7e0466
This file, and its tests, are not useful for tripleo so we're
removing because they're now becoming problematic.
Change-Id: I4207e7f543f33dda640bf0784e54311c66ba4e30
Signed-off-by: Kevin Carter <kecarter@redhat.com>
With the switch to Ubuntu Focal for tox jobs via https://review.opendev.org/#/c/738322/
our 1.1.0 version of hacking pulls in old modules that are not compatible
with python3.8:
https://github.com/openstack/hacking/blob/1.1.0/requirements.txt#L6
Let's upgrade hacking to >= 3.0.1 and < 3.1.0 so that it supports python3.8
correctly. The newer hacking also triggered new errors which are
fixed in this review as well:
./tools/render-ansible-tasks.py:113:25: F841 local variable 'e' is assigned to but never used
./tools/yaml-validate.py:541:19: F999 '...'.format(...) has unused arguments at position(s): 2
./tools/render-ansible-tasks.py:126:1: E305 expected 2 blank lines after class or function definition, found 1
./tools/yaml-validate.py:33:1: E305 expected 2 blank lines after class or function definition, found 1
./container_config_scripts/tests/test_nova_statedir_ownership.py:35:1: E305 expected 2 blank lines after class or function definition, found 0
Also make sure we exclude .tox and __pycache__ from flake8 as well
We also need to change the lower-constraint requirements to make them
py3.8 compatible. See https://bugs.launchpad.net/nova/+bug/1886298
cffi==1.14.0
greenlet==0.4.15
MarkupSafe==1.1.0
paramiko==2.7.1
Suggested-By: Yatin Karel <ykarel@redhat.com>
Change-Id: Ic280ce9a51f26d165d4e93ba0dc0c47cdf8d7961
Closes-Bug: #1895093
Since upstream requirements is removing support of py27 but
TripleO jobs still runs on py27 and which is going to break
the deps installation.
In order to fix, we can create a seperate testenv py27
to handle that and it should not depends on upstream
constriants.
Related-Bug: #1861803
Change-Id: I61365503cc1c70644d6520f54646492359fa4e44
It's recommand to use this way. With tox is not really necessary to do
it but it can be good to use it. See this article:
https://snarky.ca/why-you-should-use-python-m-pip/
For example python -m pip executes pip using the Python interpreter
you specified as python.
Change-Id: Icf90d76eb51c4a52c2cfda0f51f64697bd5cfdb9
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.
[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045
Change-Id: I806842ce6d2522deab060f5e9ef6607a1e919dbf
Until now if there is a nit inside any
Ansible task part of tripleo-heat-templates we will
need to wait until the end-to-end test imports
the actual tasks to fail.
This submission adds the hability to run a syntax
check for any Ansible task part of any role
defined by default in the resource registry.
Also it will allow to reduce the CI CO2 footprint
by not executing unneeded jobs meant to fail.
Let's save the planet and some CI cycles.
Change-Id: I6eb7c873cc9a4b7d765e745dc260475bff7b268a
This change makes sure that we apply pyflake8 checks on all python
codes to improve its readability.
Note that there are some rules applied for other OpenStack projects,
but not yet turned on, which should be enabled in the future.
Change-Id: Iaf0299983d3a3fe48e3beb8f47bd33c21deb4972
Change order of default tox envlist in order of likeliness to fail on a
new change and add py37 and py36.
Change-Id: If72e480c12385463088e2e0962801cd7095a6f12
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: Ifa8bcc1c1c29551a0ff80edc82699028c8305fe6
Closes-Bug: #1801657
It is always safe to define the minimal tox version required to run,
if the host tox is less than this the tool will exit with an error
message indicating the user needs to upgrade tox.
For ref: https://tox.readthedocs.io/en/latest/config.html#tox-global-settings
Change-Id: I3b387930451d78e20a69b8c29b0b28290673ef78
The nova_compute container kolla config is currently set to recursively change
the ownership of /var/lib/nova to nova:nova on startup.
This is necessary when upgrading from an non-container deployment to a
containerized deployment as the nova uids are not consistent across the host
and container image.
If the nova instancedir is an NFS mount then open filehandles are
broken and every VM using that NFS export fails with I/O errors.
This change re-implements the nova statedir ownership logic to target only the
files/directories controlled by nova.
Requires dist-git change: https://review.rdoproject.org/r/14734
Change-Id: I57d421feb6356d28002e77fb9bfa50a397758cbf
Closes-bug: 1778465
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: I09bb55e842515307fbedeee6ba6519dfa4b95e24
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.
Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.
Add openstack-tox-lower-constraints job to the zuul configuration.
See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.
Change-Id: I67d2ab519d1baf463e4ad253b8a85b5194ad31f6
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This uses the -c parameter to process-templates.py to clean the
generated templates in the local repo.
Change-Id: Ib105f60a1e54a6d6372d00bb2db6a9b378b2176e
'pip install -U' ugrades specified packages, this is not necessary
since we use constraints, remove the parameter '-U' from the line.
With tools/tox_install.sh - which a previous change of mine removed -
the -U was not harmful, but with the current set up, it might cause
upgrades, so remove it.
Change-Id: I18b21a396b8df4224cb21ce5b8fd062f80604167
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
Change-Id: I0b36f95fa92f15159156815bc6d8e1add8902182
The roles data validation added in
2eb1476b6e was never run due to a typo in
tox.ini.
Change-Id: I0a151c9863086e4447cedf0790a9e4a18f433cfe
Closes-Bug: #1718391