Commit Graph

63 Commits

Author SHA1 Message Date
Ghanshyam Mann c2ff9b8f49 Retire Tripleo: remove repo content
TripleO project is retiring
- https://review.opendev.org/c/openstack/governance/+/905145

this commit remove the content of this project repo

Change-Id: I7f1dc7801a025d9bb28110f74340846b99870b79
2024-02-24 11:43:13 -08:00
rabi 0c0def6f81 Fix issues with tox 4.2.4
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
2023-01-06 04:46:17 +00:00
rabi 7fd4519b22 Remove tox skipdist=True
This does not work with latest tox 4.x.

Closes-Bug: #2000357
Change-Id: Ib0fca00c92ef56fce57eb6355cb6be36e478a744
2022-12-23 12:04:12 +05:30
Zuul 90e314a2bd Merge "Use python -m instead pip directly." 2022-12-07 09:17:29 +00:00
rabi 889dffa6a8 Fix openstack-tox* failures
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
2022-11-28 11:50:57 +05:30
Daniel Bengtsson 5c34b2ff55 Use python -m instead pip directly.
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
2022-11-18 15:39:14 +01:00
Sofer Athlan-Guyot 90c52db21e Ensure container's image get updated if their name stay the same.
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
2022-09-27 12:20:54 +02:00
Douglas Viroel d5a9d845e3 Add test-requirements.txt in tox-tht deps
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
2022-07-02 12:03:54 +00:00
rabi 0da3db3b94 Install ansible.posix.debug stdout callback plugin
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
2022-05-06 09:55:52 +05:30
rabi 90cf6a6dbe Switch to stestr
stestr is maintained project to which all Openstack projects
should use.

Change-Id: I18a83ef1909e758e82f7e9d888d65363a4528249
2022-04-08 19:43:56 +05:30
vcandapp dde9a258d8 Update dervice_pci script to handle pci address formats
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
2022-01-24 13:20:26 +00:00
Zuul d7347599ee Merge "Skip yaml validation for releasenotes and zuul.d" 2021-10-01 12:17:16 +00:00
wu.shiming 3cb006d532 Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I5792c86745b875d074f670d92fe78a84a907bd74
2021-09-18 11:55:51 +08:00
Jiri Podivin 580139d2f2 Setting language for the python3.6 tox environment
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
2021-08-19 08:35:44 +00:00
Takashi Kajinami 2341c892f9 Skip yaml validation for releasenotes and zuul.d
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
2021-07-14 21:10:20 +09:00
ramishra a263da138f Use merge strategy for EndpointMap
Now someone can override individual endpoints like
below in an environment:

parameter_merge_strategies:
  EndpointMap: merge

parameter_defaults:
  EndpointMap:
    AodhPublic:
      protocol: http
      port: 9999
      host: 121.21.2.1

Closes-Bug: #1897592
Change-Id: Ibf2e0d183dd51421c4feb7467c3c01fb416d2965
2021-06-15 09:15:41 +05:30
Sorin Sbarnea a013f42e36 Enable ansible-lint
- enable run of ansible-lint, with a temporary set of excludes
- fixes two problems reported by ansible-linter

Change-Id: Ibbe23db8fd5ac1008109f50f514df96686b0fa19
Bug: #1921409
2021-03-30 09:18:15 +01:00
Sorin Sbarnea 2108a5191b Fixed tox executions
- 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
2021-03-26 15:37:07 +00:00
Sorin Sbarnea 727d1656df Add support for py39
- 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
2021-03-24 09:40:57 +00:00
Hervé Beraud fea7fa2d9c Add doc/requirements
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
2021-01-05 09:49:46 +01:00
Kevin Carter efd1975513 The lower constraint file has been removed
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>
2020-12-08 10:56:59 -06:00
Hervé Beraud 97ddb9496c Replace deprecated UPPER_CONSTRAINTS_FILE variable
UPPER_CONSTRAINTS_FILE is deprecated and TOX_CONSTRAINTS_FILE is
the new environment variable name that replaces it [1].

This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

[1] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file
[2] https://review.opendev.org/#/c/722814/

Change-Id: Iffb3f2051a45c77e4d58b54f07b436486ce9e153
2020-11-04 11:11:22 +01:00
Michele Baldessari 87b365afd3 Fix Flakes and lower-constraints errors
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
2020-09-10 11:10:54 +02:00
Wes Hayutin 7bc4670f15 remove py27 in tox.ini from tripleo-heat-templates
Remove python 2 from envlist parameter. Check the link:

https://etherpad.openstack.org/p/drop-python2-support
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

The plan is drop the python 2 support from OpenStack in Ussuri release.
Move the basepython parameter.

Change-Id: I794fe6677328d74bef305dcfc15ab81038ae2b87
2020-04-01 21:31:17 -06:00
Wes Hayutin 3370d7b1d3 remove py27 tox env for tht
py27 tox jobs are not running.
clean up tox.ini

Change-Id: Id14f2a2afc55a259737d0279038abff76fc848af
2020-03-24 20:04:36 -06:00
Wes Hayutin da19fdbccd Add py27 testenv for tox.ini
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
2020-02-04 20:38:32 +05:30
Daniel Bengtsson a465243be1 Stop configuring install_command in tox.
Currently, we are overriding 'install_command' to use 'pip'. This is
considered poor behavior and 'python -m pip' should be used instead:

https://snarky.ca/why-you-should-use-python-m-pip/

It turns out that this is the the default value provided by tox:

https://tox.readthedocs.io/en/latest/config.html#conf-install_command

So we can remove the line and simply use the default value.

Change-Id: Ideb8c351a88f55592d58e6c42709db76de50c82b
2019-11-14 13:04:50 +01:00
Daniel Bengtsson 35ff2c37c6 Use python -m pip instead pip command.
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
2019-11-11 10:18:06 +01:00
Zuul 5504f947ea Merge "tox: Keeping going with docs" 2019-11-07 20:02:09 +00:00
gujin bfa44f0bbe tox: Keeping going with docs
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
2019-11-03 02:44:38 +08:00
Carlos Camacho 0de387ee3c Ansible lint check in THT
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
2019-10-30 04:56:05 -04:00
Takashi Kajinami e804f7bd82 Remove duplicated ignore list for pep8 check
Change-Id: I0c3b17f858f093c260d4412544b3562c6200655e
2019-09-05 23:18:25 +09:00
Takashi Kajinami f47dfe1059 Enforce pep8/pyflakes rule on python codes
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
2019-09-05 15:40:46 +09:00
Corey Bryant f4a4af8701 Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: Ie696d60c6c6d53f189ad4259a1682d030478fdf2
Story: #2005924
Task: #34253
2019-07-12 16:39:23 -04:00
jacky06 8d85e61c36 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I0f522b848c586506d9556b6821d03f9c0c302cd8
2019-06-26 02:43:46 +00:00
Natal Ngétal 0fb353339a [Configuration] Add missing py37 and corrected default envlist.
Change order of default tox envlist in order of likeliness to fail on a
new change and add py37 and py36.

Change-Id: If72e480c12385463088e2e0962801cd7095a6f12
2019-03-27 10:57:19 +01:00
98k e7d3bd90c1 fix tox python3 overrides
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
2019-03-14 08:51:55 +00:00
Zuul 4eb89d09d1 Merge "Update the min tox version to 2.0" 2019-03-12 18:45:27 +00:00
Emilien Macchi 160cddda3f Rename docker_config_scripts to container_config_scripts
Change-Id: Iabd65560c2fc28b3aeca07a21efa861c4c583c01
2019-03-06 09:05:50 -05:00
confi-surya 1e3fd7e846 Update the min tox version to 2.0
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
2019-02-04 07:38:32 +00:00
Zuul f47e2f70a4 Merge "fix tox python3 overrides" 2018-09-19 05:14:47 +00:00
Cédric Jeanneret d37308d63c Fix python3 support in yaml-validate script.
Python3 drops the "iteritems" method for dict in favor to
"items".

Change-Id: I8d21233e917b5d36be385d59f1a7c9a0588aea2d
Closes-Bug: 1783988
2018-07-27 15:20:32 +02:00
Oliver Walsh 58624abf5f Improve nova statedir ownership logic
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
2018-07-09 17:07:30 +01:00
huang.zhiping f5ab0e760d fix tox python3 overrides
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
2018-06-10 00:16:26 +08:00
Doug Hellmann 08b1132f89 add lower-constraints job
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>
2018-04-20 16:10:28 -04:00
Ben Nemec f66df2ec12 Add "clean" tox target
This uses the -c parameter to process-templates.py to clean the
generated templates in the local repo.

Change-Id: Ib105f60a1e54a6d6372d00bb2db6a9b378b2176e
2017-12-13 17:14:36 -06:00
Andreas Jaeger faf245de60 Remove -U from pip install
'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
2017-12-02 19:17:18 +01:00
Andreas Jaeger 3a4698d8e8 Avoid tox_install.sh for constraints support
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
2017-12-01 07:47:29 +01:00
Jenkins de3541a248 Merge "Run roles data validation in CI" 2017-09-25 05:00:45 +00:00
Martin André 987412621f Run roles data validation in CI
The roles data validation added in
2eb1476b6e was never run due to a typo in
tox.ini.

Change-Id: I0a151c9863086e4447cedf0790a9e4a18f433cfe
Closes-Bug: #1718391
2017-09-20 12:33:06 +02:00