On 30.09.2023, "old" ansible galaxy(galaxy.ansible.com) was replaced
with "galaxy ng"[1].
There was a bug [2][3][4] that was fixed only in a supported
ansible-core versions, so:
- v2.12.8
- v2.13.3
- v2.14.0 (and all newer versions)
All openstack-ansible versions up to Yoga are using older ansible-core
versions.
As a result, bootstrap-ansible.sh script fails with an error:
```
Skipping Galaxy server https://galaxy.ansible.com/api/. Got an
unexpected error when getting available versions of collection
ansible.netcommon:
'/api/v3/plugin/ansible/content/published/collections/index/ansible/netcommon/versions/'
```
This patch bumps ansible-core version to 2.12.8 that includes required
fix.
[1] https://www.ansible.com/blog/new-ansible-galaxy
[2] https://github.com/ansible/ansible/issues/81830
[3] https://github.com/ansible/ansible/issues/77911
[4] https://github.com/ansible/ansible/pull/78325
Change-Id: I2c15c220ca8c6b6f0cbedbf0da8e802b7c0f5e2d
With tox release of 4.0, some parameters were deprecated and are ignored now
which causes tox failures. One of the most spread issues we have is using
`whitelist_externals` isntead of `allowlist_externals`
Change-Id: Id2a4cb712b4099bff1c05c4d10502a7572517268
Currently TESTING_BRANCH serving 2 purposes - it controls over OSA
branch to use and services branch.
At the same time we need to have these separated from time to time, as
OSA is trailing.
Change-Id: Ib5ca8c7d3300f4e8efd81f87612c821594bebfac
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 - after
adding constraints to deps as is best practice as well.
Mosts tests itself use "pip install" in the shell scripts which sets
also the constraints. Change that to "python -m pip install" like done
for tox.
Change-Id: I27f80d8aa4ac3688ee56e8a9234e34f4e09afe34
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Remove obsolete sections from setup.cfg
- Update requirements, no need for python_version anymore
- Cleanup doc/source/conf.py to remove now obsolete content.
- Use newer openstackdocstheme version
- Cleanup tox.ini for Python 3 only
Change-Id: I9d63e63cf142fded002f7212588266d88f41dd06
This requires the centos-7 functional jobs to be non-voting as
a precursor to replacing them with integrated repo tests. These
are centos-7 jobs are removed entirely from the gate template.
Change-Id: I0cd779bb6debaf7b77788b671b2d77869ec89667
1. 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.
2. Remove the unnecessary blank line for tox.ini
[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045
Change-Id: Ie837d376bb1a1d93367369d25140dd8a9d5ac14e
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 of that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: Iadbc25016279958768928e9c63ee545c0bca0e23
Using tox for requirements management requires in-repo
requirements files for all our repositories. Rather than
do that, we make use of the tests repo to capture our
common requirements and use this to install them.
This reduces our review requirement rate and simplifies
maintenance for us for the tox config. It also makes it
usable with 'Depends-On', which is marvellous!
The tox changes in this review will need to be replicated
to all other roles. All other roles will also need their
'test-requirements.txt' file removed unless they have
something special in them which is not common.
The tox requirements definitions for docs/releasenotes
builds are left in-place as those are standard entries
across the community. If that changes at some point, we
can re-assess those entries too.
Change-Id: I7c209dc69eb893b2448a7d70cf195e55b628604b
Current run_tests.sh executes another script (tests-repo-clone.sh)
to clone the tests repo. That script therefore has to be replicated
out to all the other repositories too.
In order to try to reduce the footprint of things that need to be
replicated out to the repositories, we fold the tests repo clone
into run_tests.sh and move the clone of the previous tests repo
into the common test script. We also remove the conditional for
the previous test repo clone as it does no harm to always have it.
To reduce the maintenance when creating new branches, we key the
branch to be cloned by run_tests.sh to the content in the .gitreview
file. This way as soon as a branch is created and that file is
updated, the right branch is cloned and the system becomes self
maintaining.
Some extra comments are added to explain the purpose of variables/
commands and the install_pkg_deps function is changed to just be
in line script as the function is no re-used anywhere else.
We change the set vars in the common script to add x and remove v
to reduce the output verbosity and only output the useful stuff.
Finally, the linters job definition is changed so that it uses
run_tests.sh to execute the lint tests. This simplifies the job
definition and also ensures that zuul runs tests in the same way
that humans do.
Change-Id: I9f26f4f438715ce6361cc9960f58f2d256c5a839
In order to allow the use of the environment variable which informs
Ansible which user executed the playbook, we pass the USER env var
into the environment that tox builds.
Change-Id: I529134be4cf557202450606189de6fe70244b494
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
In order to be able to simultaneously work with the
differing implementations of zuul-cloner in zuul v2
and zuul v3 we implement a detection routine to
behave appropriately for each version.
This is very much a band-aid just to help us transition
because once the transition to zuul v3 is complete we
should be able to ditch this whole playbook for
something built into zuul v3, and use something very
simple for executing tests when not using zuul.
Change-Id: Ic824e7ca7c564d5de7a27c77a79014ad274afade
Currently the role tests use whatever versions of pip,
setuptools and wheel are already installed on the host.
When a version of these tools changes it often causes
problems for our testing.
This will ensure that we use a known good set of pins
which is maintained in the general SHA bumping process.
Change-Id: I5720eb69cfbbe24136ebdfcac9c68893b3595b27
When executing the tests repo clone in OpenStack-CI,
use zuul-cloner instead of git to enable cross-repo
testing. This ensures that if a dependent patch from
the tests repo is noted using 'Depends-On: <change-id>'
in the commit message, that patch will be included.
Change-Id: Idce7abebf32f24c356a27e099fbca954d917402b
With the implementation of https://review.openstack.org/388087 all
tox targets may now use upper constraints.
Change-Id: I72bbc3d1cbd2b03c3c41d9fb5782b18fe5afbe8b
This patch implements test scripts intended for use by all
OpenStack-Ansible role tests.
The intent is to simplify the role tox.ini configuration
and ensure that as many changes to role testing configuration
can be managed from the centralised tests repo instead of
individually in each repository.
This patch implements the scripts to centralise the
ansible-lint, ansible-syntax, and functional Ansible tests.
Functionality included:
- For a simple functional test, the defaults will be allow
the execution of the test without any parameters set.
- For a scenario test the scripts allow the inventory,
extra vars and any other CLI parameters for Ansible to be
set via environment variables.
- Both check mode and an idempotence test.
In addition to this functionality, the bash scripts are all
set to fail on error to ensure that tox shows a failure.
Change-Id: I23c24146485da340d4f046f80e4814652e6e3876
This patch implements test scripts intended for use by all
OpenStack-Ansible role tests.
The intent is to simplify the role tox.ini configuration
and ensure that as many changes to role testing configuration
can be managed from the centralised tests repo instead of
individually in each repository.
The common tests repo target location when cloned is changed
from 'tests/playbooks' to 'tests/common' to better reflect
the content and purpose.
Change-Id: I1a93329ada24670c87588ce5a07f92c9bce4e50b
Replacing usage of ansible_ssh_host, ansible_ssh_user,
ansible_ssh_port with ansible_host, ansible_user and ansible_port
Depends-On: I35371879a87c115f219cd181245fe59f6d7d3f77
Change-Id: I97c3958c406b44b271d361860516d0b903438a83
The volume of logs we collect in CI jobs are extensive. This
patch ensures that the logs collected are compressed to reduce
the space taken in CI systems.
PYTHONUNBUFFERED is also set to ensure that the console log
from the CI jobs is recorded in the exact order of execution.
Change-Id: I323987e281eff6245189109e6c4b17e999739b8c
Related-Bug: #1620849
Add interface drop for CentOS (Will need to be extended to allow
multiple interfaces)
Add network config files based on ansible_os_family.
Add nodepool tasks for CentOS
Add a default network file for both CentOS and Ubuntu
Change-Id: Ideb84f153fbd9f8f83ff39042f139b25719b39d8
For test repo we should build out keystone + infra services, as they are
the most commonly used roles/tasks.
We still need to add some funcitonal tests but this should give a good
base. The test repo will consume it's own test plays in the same way as
other repositories would. We use a "git clone ." to avoid a situation
where we clone the old repo containing the errors we are trying to fix.
Additional fix, we don't need a "when" clause on the rabbit/db creation
tasks - since these are already delegated and a "run_once" will suffice.
This fix is required for the tests to pass.
Change-Id: I482500872f9e29a71e1576f67a0ad390be2a3ece
This change enables log collection within the gate so that further analysis
on gate tasks can be performed post build. This is very useful when
debugging problems.
Change-Id: I50f0baf3050942c47c135270f911c4baa29791c8
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
As per [1] all linting tests can now use upper-constraints. This patch
removes all instances of the install_command override relating to lint
testing which were needed to negate the use of upper-constraints.
[1] http://lists.openstack.org/pipermail/openstack-dev/2016-August/101474.html
Change-Id: I6dde0c0b7259b231e243fdb0c4627bc7b485c800
- gitignore to avoid bad files
- git review to enable git review/gerrit integration
- Vagrantfile like the other repos, but not useful (yet!)
- dummy inventory file
- setup.* files because docs use pbr
- requirements files
- tox.ini for test launcher to match openstack standards
- scaffolded docs and release notes for gates to pass
Change-Id: Iaf78c8fd3c2138e1d7d4384fb83c90cb7ddd6d10