With update of ansible-lint to version >=6.0.0 a lot of new
linters were added, that enabled by default. In order to comply
with linter rules we're applying changes to the role.
With that we also update metdata to reflect current state.
Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/888223
Change-Id: I671cc35a055b35fb249ad3054c45ec65f2b54ab4
At the moment we don't restart services if systemd unit file is changed.
We knowingly prevent systemd_service role handlers to execute
by providing `state: started` as otherwise service will be restarted twice.
With that now we ensure that role handlers will also listen for systemd
unit changes.
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/879671
Change-Id: I8140add1a4e4fdacee89bd29bd2e3c87eff0953a
We used rsync to synchronize filters from rootwrap.d. However, with
smart-source that is not needed anymore, since /etc/cinder is simply
a symlink to the source directory of rsync. We still need os-brick
rootwrap linkage though.
Change-Id: Ib1571c5be67155b584c412da8336de49bc80d948
With ansible-core 2.13 it tries to substitude package resolution in apt
module.
However git-core is used in Debian as transitional name, but ansible
tries to select it and provide version, which is not correct behaviour.
But since git-core is not really valid anyway, we just replace it
to workaround ansible's imperfectness.
Change-Id: Ib0a75886baffec27c8a7d38d729623c7b41216eb
With changing cinder code we potentially can break some backends.
In order to detect this in time we are adding ceph and nfs scenarios.
We also fix lvm backend for use on RedHat.
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/859339
Change-Id: Ifceb2b816199339ec7725bd95cc890595eed95d9
Nowadays Cinder does not support v2 api so it makes sense to ensure
that these endpoints or service is not present in catalog.
Change-Id: I62a4ba182cc752a5bc4f6e8c4d2430f7e7aafe54
This configuration option has been observed to result in file
descriptor leaks in certain circumstances. A variable is added
here so that it can be easily overridden.
Related-Bug: #1961603
Change-Id: I8155264b181d6f21728804ef8260979931597427
According to our playbook, role runs against api last, after scheduler,
volume and backup services are already setup.
It makes difference only when cinder-scheduler and cinder-api are
deployed to different targets.
Change-Id: I18f68b5cb9dd60d9cf72850e840d0459e1245b76
We drop py27 library as it's deprecated and should not be used anywhere
zlibc is also not maintained for a while and has been removed in
bullseye. But it should not be required by other distros/packages anyway
Change-Id: I5835f538634900d210e236b49fb64271d43e9861
Backend creation should happen on the last host in the group, instead
of the first one, since we put LB in MAINT state during deployment, while
other containers are not ready yet. Thus we should be creating backends
at the very end of the deployment, when all containers are set.
Change-Id: I3d5811e059d1b5cb3e87fe7657872e41105c832e
Closes-Bug: #1920964
All references to Gentoo, SUSE, Debian stretch and Centos-7 are removed.
Conditional tasks, ternary operators and variables are simplified where possible
OS specific variables files are generalised where possible
Change-Id: I796d9de164a8b79eff8a615442dd46e7de2353e7
We use the same condition, which defines against what host some "service"
tasks should run against, several times. It's hard to keep it the same
across the role and ansible spending additional resources to evaluate
it each time, so it's simpler and better for the maintenance to set
a boolean variable which will say for all tasks, that we want to run
only against signle host, if they should run or not now.
Change-Id: Ibdb078d39b3189c844aed14aa1ae74cb2ce97600
Cinder api container may not have required binaries and clients in order
to add qos types and volume types. In the meanwhile
cinder_service_setup_host is supposed to have all necessary things for
the successful creation of the resources.
Change-Id: I97b50cfe3140d0a0f77f6e562cb144cb3d36bd12
With Train openSUSE is switching the openstack packages to use Python 3.
This means that we need to use the python3 variants of python-module
packages.
Depends-On: https://review.opendev.org/683123
Change-Id: Ib51d7c1a119f6d2890d94d1fcb3e7d4b8d76fc91
Move service to use uWSGI role instead of iternal task for uwsgi
deployment. This aims to ease the maintenance of uWSGI and speedup
metal deployments as the same uwsgi environment will be used
across all services.
Depends-On: https://review.opendev.org/678025/
Change-Id: Ieac6d03a436f6b706d7f12e292ffc98171a43246
This patch splits distro variables into two:
- cinder_*_distro_packages defines dependant packages
- cinder_*_service_distro_packages defines cinder service packages itself
So that we're installing cinder_*_distro_packages both for source and distro
installs while cinder_*_service_distro_packages are only for distro ones.
Also since only qemu-tools depends on librbd, we leave it alone in
cinder_volume_distro_packages_tools.
Change-Id: I746c800dc75b39f57f7c707aedf35f6814cfdef0
This patch refactors the openstack user/service/endpoints creation to
service_setup.yml which will eventually be managed by
openstack-ansible-tests.
Change-Id: Idefa676a5851346a83d613aa61cb1d618e015c29
This patch moves the cinder distro packages into the correct variables
so that each packages is only installed where needed.
Change-Id: I3d2edfefade7e415aa201bccd2fd2be3ed7159d9
The debian packages for individual cinder services provide service
configs which automatically start after install, leading to all cinder
services running on each cinder volume host. Instead only install the
python3-cinder library package and rely on the service files OSA manages.
uwsgi packages are only required on hosts running cinder-api, so an
additional variable, 'cinder_api_distro_packages' has been added for
packages specific to those hosts.
Beginning in the Stein release, Ubuntu distro packages are now using
Python3. This requires additionally installing and using the uwsgi
python3 plugin.
Change-Id: Iafcd9a8141fffb2226ec5103960064decc579bd5
The RedHat-based operating systems such as CentOS have a pretty
stable list of packages, therefore, we don't need to pin it by
version and we can instead move to a much more generic redhat.yml
which will support a bigger range of systems.
Change-Id: I833e21b1d7bf47121e75ebc07baeb374f5876a42
This patch adds support for this role to be able to deploy on
Debian Stretch.
Change-Id: Id426c570dc18ac2824b5785587bceaa794324eb6
Needed-By: I9a92b73c419a0dc1cca40dacfef75de61a61db94
The distro_install and service_install packages have got all
mixed up together. As a result source installs are dropping
openstack distro packages all over the place.
This reverts commit c0010010c2.
Change-Id: I485ec63d7e3f750734fb07bf97aa4cdfcecae468
When performing a distro_install avoid installing services where they
are not needed. The services are started automatically and are
consuming resources.
Change-Id: I50608e7be402a022c6c488bba38899469dd99a2b
The cinder-volumes service requires a set of tools installed from
distro packages, which have dependancies on librados and librbd. This
patch moves the installation of these tools to after the point that
the ceph_client role has run. This ensures that the ceph repo config
is correct and in the case of ubuntu any necessary apt pins have
been installed. This prevents issues where packages in the distro
repo may have sematically higher version numbers that the ceph
repo and then require a package downgrade - this leads to an install
failure.
Change-Id: I9de3a3566df913487b0cbf971c4006e9e52feaac
The files and templates we carry are almost always in a state of
maintenance. The upstream services are maintaining these files and
there's really no reason we need to carry duplicate copies of them. This
change removes all of the files we expect to get from the upstream
service. while the focus of this change is to remove configuration file
maintenance burdens it also allows the role to execute faster.
* Source installs have the configuration files within the venv at
"<<VENV_PATH>>/etc/<<SERVICE_NAME>>". The role will now link the
default configuration path to this directory. When the service is
upgraded the link will move to the new venv path.
* Distro installs package all of the required configuration files.
To maintain our current capabilities to override configuration the
role will fetch files from the disk whenever an override is provided and
then push the fetched file back to the target using `config_template`.
Change-Id: Ib3447cd5b0bcada4cdf82d9e4a9fe5160299f9c3
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
Signed-off-by: Kevin Carter <kevin@cloudnull.com>
It's unnecessary and even not recommended to install network storage
related packages on all containers including api and scheduler one.
This change makes open-iscsi, nfs-utils and rpcbind required just
for cinder-volume and cinder-backup because it's obligatory when using
various backends.
It's not based on checking used volume drivers because most of them
relies on iSCSI and NFS.
Depends-On: https://review.openstack.org/615869
Change-Id: If289b3e0b00a279afe3c13a628eed2bc4eacc0f7
Closes-Bug: #1704161
Currently the devel packages are installed everywhere,
but they only need to be where the wheels are built.
Also, there is already a task to install the packages
needed on the target hosts when installing - so we do
not need to give the same list to the venv install role
because they will already have been installed.
All -dev/-devel packages are moved into the devel
variable so that they are only installed for source
builds.
The distro install should not need the devel packages
at all, so the list extension is removed.
Finally, we remove the unnecessary installation of the
compiling packages because the python venv build role
already does it.
Depends-On: https://review.openstack.org/613585
Change-Id: I1d8c556c9f71cef9e84f097957682fc7b847f37c
Now that we no longer use our own keystone module, but
instead make use of the ansible runtime venv's shade
library and upstream ansible modules, we can eliminate
this package/library being installed on the host.
Change-Id: Ib824e6e2b6e8182b2423667f03649b2bbe8da962
To make the transition between versions easier,
we rename the vars file. This also resolves
issues when meta-dependent role inclusions do
not pick up the correct file when using the
include_vars task with multiple search paths.
We also add the 'python-cursive' package to the
distro install package list as cinder requires
it, and the service packages have not yet got
it as a dependency in the spec.
Depends-On: https://review.openstack.org/602924
Change-Id: Ibb712b60757cf085cf794551ca5504e68977cd0a
In order to radically simplify how we prepare the service
venvs, we use a common role to do the wheel builds and the
venv preparation. This makes the process far simpler to
understand, because the role does its own building and
installing. It also reduces the code maintenance burden,
because instead of duplicating the build processes in the
repo_build role and the service role - we only have it all
done in a single place.
We also change the role venv tag var to use the integrated
build's common venv tag so that we can remove the role's
venv tag in group_vars in the integrated build. This reduces
memory consumption and also reduces the duplication.
This is by no means the final stop in the simplification
process, but it is a step forward. The will be work to follow
which:
1. Replaces 'developer mode' with an equivalent mechanism
that uses the common role and is simpler to understand.
We will also simplify the provisioning of pip install
arguments when doing this.
2. Simplifies the installation of optional pip packages.
Right now it's more complicated than it needs to be due
to us needing to keep the py_pkgs plugin working in the
integrated build.
3. Deduplicates the distro package installs. Right now the
role installs the distro packages twice - just before
building the venv, and during the python_venv_build role
execution.
Depends-On: https://review.openstack.org/598957
Change-Id: Ica126c4ae20d2a7972a9309147cf6db902343bbf
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
This removes the systemd service templates and tasks from this role and
leverages a common systemd service role instead. This change removes a
lot of code duplication across all roles all without sacrificing features
or functionality. The intention of this change is to ensure uniformity and
reduce the maintenance burden on the community when sweeping changes are
needed.
The systemd journal would normally be populated with the standard out of
a service however with the use of uwsgi this is not actually happening
resulting in us only capturing the logs from the uwsgi process instead
of the service itself. This change implements journal logging in the
service config, which is part of OSLO logging.
OSLO logging docs found here: <https://docs.openstack.org/oslo.log/3.28.1/journal.html>
A new variable `cinder_environment_overrides` has been added to ensure
the correct PATH is set for cinder services.
This reverts commit b219b90536.
Change-Id: I1cb10aa591a8262add47e2f5b61cfded9e28241d
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>