Branch renaming to unmaintanted/ breaks the gate-check-commit
script when it sets the source branch for an upgrade job.
This patch determines the source branch prefix dynamically in
an attempt to make upgrade jobs still work from branches marked
as unmaintained under wider OpenStack policy.
Change-Id: I9662156fe0e9463e54ccc5c6ede0624a85887ebe
Currently PIP_OPTS concatenate with no spaces and result in an
invalid set of command line options for pip.
Change-Id: I07b88856d8c1c30843eed1f991d475b431d0486f
At the moment there is no well defined way to supply list of extra Python
requirements for Ansible venv. However, some collections for their work might
require presence of extra libraries inside the execution environment.
While PIP_OPTS might be used right for that, it's usage is not transparent
or documented.
In order to handle such need, `user-ansible-venv-requirements.txt ` is being implemented
that reside inside OSA_CONFIG_DIR and contains list of required packages
for installation when running bootstrap-ansible.sh
Change-Id: Ic99f7eff200e2e672dcc3edd875b155af84232b7
A git repo may contain one collection, several collections at
the top level or be organised into namespace/collection named
directories. See [1].
The '#' symbol is used to identify a particular collection from
a repository to install. This patch ensures that the paths
searched in CI for zuul source directories do not include parameters
beyond the '#' symbol, and that the contents of the collection
requirements file is also correct for installing any required
collections using the 'dir' type.
[1] https://docs.ansible.com/ansible/latest/dev_guide/developing_collections_distributing.html#specifying-the-collection-location-within-the-git-repository
Change-Id: I081212819c61b46c2ad143025e7287cd3ce5390a
The previous code retrieved logs from the lxc containers by copying
them from the /proc/<pid>/root/... directory which worked except
when the files being collected were symlinks, which would then
potentially point to the wrong, or a missing file on the host itself.
This patch changes the log collection to collect from inside the
running containers using tar, giving a consistent view of the
source files. Any symlinks are replaced with the content of files
they reference in the collected logs.
A side effect of using the more complex lxc-attach/tar approach
was corruption of stdout due to the previous simple method of
parallelising the log collection by running each collection function
in the background. This patch switches to use gnu parallel
as the mechanism to run multiple log collections simultaneously
and keep the console output clean.
Change-Id: Ief03c33b76eac6e256477cfaa16c8a59acd7d702
Function log_instance_info is being called from gate-check-commit script
after each major step. With that we update cache and try to install
packages that are already installed.
Change-Id: Iaacadb3785b834bc9288d498a3a3c7028bd64c5b
Right now exit code 4 stands for hosts being unreachable [1], that might
take place in envoronments at the moment of adding new computes
So instead of failing the script and asking for user to re-run commands
manually we silently proceed when anything fails with unreachable hosts.
[1] 74f6e6a134/lib/ansible/executor/task_queue_manager.py (L128C5-L128C26)
Change-Id: Ib422f181256a67cbde4b485c1f1e9079d0400faf
This is not dependant on if we are running a regular or an upgrade
job. Move the code to a more logical location.
Change-Id: Ibdb29a679504ce30bcdc7591b8e68c054dbea580
The get-ansible-collection-requirements playbook cannot be used
standalone without passing an extra var for the name of the
user collections file.
This patch allows the playbook to be run standalone and the
default name will be used automatically, still allowing an override
to be used as currently happens in scripts/bootstrap-ansible.sh
Sonetimes it is desireable to have a simple way to update the
installed collections without running other parts of
bootstrap-ansible, or look up flags to disable other side-effects.
Change-Id: I27131ecaa3bc0ef459d2c353be9531608dd9d9ab
At the moment we control need of installing both roles and
collections by `SKIP_OSA_ROLE_CLONE` environment variable.
This patch introduces SKIP_OSA_COLLECTION_CLONE variable in addition
to that, to enable operators more finely manage what needs
bootstrapping.
Change-Id: I07374bb52bebe27c94c229f1e759016cd34b286d
At the moment for some scenarios, like linters, where ansible bootstrap
is skipped, PIP_OPTS are undefined and linters fail due to that.
With patch we define PIP_OPTS to an empty value if
we're not in CI.
Alternatively we can patch scenarios independently
not to rely on existance of PIP_OPTS or export default in
gate-check-commit instead.
Change-Id: If451b4bc12bb0b0bfe3fe20494e99a07b59ab798
This patch allows to pass custom parameters to the bootstrap-aio.yml
playbook by the `BOOTSTRAP_EXTRA_PARAMS` variable.
With `BOOTSTRAP_OPTS` it was only possible to set extra variables.
As an exmaple, `BOOTSTRAP_EXTRA_PARAMS` can be used to define custom
set of tags that should be executed.
Change-Id: Ie53b51f4e4d5ccbd0e7ff638a9d5bce236a561bd
At the moment it's not possible to apply different versions of
services to the different groups due to playbook vars having
prescedence over group_vars. However, it can be quite important
to such use cases, for example for phased rollouts of newer versions.
This will also reduce amount of unnecessary variables that are included
for each host, since only required git details will be loaded.
Closes-Bug: #2007296
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_rally/+/881954
Change-Id: Icaa3a958926d9f9aa6cb649bd9f3da9449dd7490
This patch aims to implement testing of SLURP upgrades. While
2023.1 is the first SLURP release, upgrade from Yoga to 2023.1 is
considered as unofficial SLURP upgrade.
With that we're adding changes to gate-check-commit to be able to
provide source release from which upgrade will be perfromed.
While running upgrade script user is required to provide source
release as input to script for SLURP releases.
Also regular upgrades are now switched to Zed as they supposed to be.
Change-Id: I64e55b2c685782d23bb84e7e9f7c60708c276cc3
This reverts commit befd8424e2.
Reason for revert:
This change is not needed anymore for A release, especially with
separated-haproxy-service-config feature in place.
It creates a problem now, because haproxy-install.yml is responsible for
creating "base" haproxy service which is required for horizon to work.
If horizon does not work during setup-openstack.yml, tempest tests
may fail(along with the whole upgrade job in our CI)
That's why we need to run haproxy-install.yml, traditionally during
setup-infrastructure.
Change-Id: I5531e56610a8a63f601867d236831ce7d5e4d583
Needed-By: https://review.opendev.org/c/openstack/openstack-ansible-os_horizon/+/879517
At the moment we don't really use collection version that is
provided by depends-on. This results in testing different content
that should be. Presumably, this happens because ansible-galaxy
does install from default branch HEAD, while zuul does check-out
to refs when using depends-on. To ensure that git repo state is not
the issue, we switch type to be directory for collections that are
contained in Zuul.
Change-Id: I7a0e2f7702a9f8630ed916523b9f0e6c2bbc202b
Since Yoga release we've wrongly have dropped hosts file refresh task
This task is still required, as despite /etc/hosts now are fully provisioned
on new computes, it still does not make old ones to recognize new
ones.
[1] 8cd65feae2
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-openstack_hosts/+/877824
Change-Id: I494caa4a4104129781159ea924f3aeae94dad9a8
With previous commit [1] a condition was introduced on when to run
dstat. Though, ZUUL_PROJECT env variable used is defined
only in post jobs, while dstat should be started in pre-jobs and then
collected with logs. So we adjust condition to start up dstat in gates
at the first place.
[1] 0369605a1c
Change-Id: I7fd4a846360847496b1db7b505b35b9eff57ebbe
Due to this `echo` that has been added during script testing,
reall commands are printed to stdout instead of being executed.
Change-Id: I2abe15526b630cd7c68c3b79c148525e16fa2563
The deployment of etcd as a service on the control plane is no
longer needed as calico was the only user of this.
The etcd-server role remains in our requirements as it is used
internally as part of the Zun playbook.
Change-Id: I2a158fd2b85ec0e637071ed4ef7c123a6583ecc0
Custom linear plugin was added long time ago.
Nowadays it causes issues with loop conditionals.
It's not really needed these times. Everything works fine without it.
I also didn't notice any performance degradation after disabling it on
my AIO.
Closes-Bug: #2007849
Change-Id: I566004cfeaa4d562265f22adc044cff3458430d1
Currently, curl conflicts with curl-minimal package on Rocky:
package curl-minimal-7.76.1-19.el9_1.1.x86_64 conflicts with curl
provided by curl-7.76.1-19.el9_1.1.x86_64
To avoid complex logic between curl/curl-minimal we just install
package by providing a path to the binary it should provide.
Based on the distro this will result in instalation of either
curl or curl-minimal.
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-openstack_hosts/+/872973
Change-Id: Ia1b657ae6a21d9c3be499e7ecf6b36c11c9f08d9
This will allow the services to be cloned from github or a local
mirror by setting a small number of variables rather than overriding
every git repo URL individually.
Change-Id: I750d897e9e3c8ca161c0740c73cdc4c6e42b6440
ansible_host in deployments is designed to represent SSH address.
In cases, when address that used for SSH is different from management
network, this might lead to undpredictable results on bare metal hosts.
Thus we're ensuring that management (container) address is used
for services to listen on and to interact through.
Related-Bug: #2002645
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/870113
Change-Id: I8a5e817d024eef5453fa072d8fee5aeca9bed67b