Commit Graph

31 Commits

Author SHA1 Message Date
Andrew Bonney 151043d7f0 Fix designate upgrades when internal RPC version changes
When upgrading from 2023.1 to 2023.2 in a HA environment,
the Designate pool update command failed as it ran using
an upgraded client, but made RPC calls against instances
which had not been upgraded yet.

This commit moves the pool update to the last play host
in order to ensure that in an upgrade situation, all
virtualenvs have been upgraded first to ensure no client/
server version conflicts.

Change-Id: I93af581696de0913710592f9033545b87547b78a
2024-04-02 08:17:15 +01:00
Dmitriy Rabotyagov e7f7e7d122 Add quorum queues support for service
This change implements and enables by default quorum support
for rabbitmq as well as providing default variables to globally tune
it's behaviour.

In order to ensure upgrade path and ability to switch back to HA queues
we change vhost names with removing leading `/`, as enabling quorum
requires to remove exchange which is tricky thing to do with running
services.

Depends-On: https://review.opendev.org/c/openstack/ansible-role-zookeeper/+/899386
Change-Id: I8c418906b75edb633948f2c074170454a8f3e2d0
2023-10-26 16:08:04 +00:00
Dmitriy Rabotyagov d41ac57fe4 Fix linters and metadata
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: I6ca96cd72600e59c2e6616880d7cd9155a26c5bb
2023-07-14 12:56:46 +00:00
Dmitriy Rabotyagov b6d826f675 Ensure service is restarted on unit file changes
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.

Change-Id: I3dcb02cfd8c5057411488dfefdd0b5381231a972
2023-04-10 16:38:06 +00:00
Dmitriy Rabotyagov a618a6ddd3 Add coordination support
This patch adds configuration for coordination service when it's
available.

Depends-On: https://review.opendev.org/c/openstack/ansible-role-zookeeper/+/865449
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/864750
Change-Id: I632439956f17bbac8987c3429634ebac8b1c3d44
2022-11-28 12:46:00 +00:00
Jonathan Rosser e0afffd98c Remove references to unsupported operating systems
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: I96a9757621eab69e7bc16a2e31ab28d0eb8a23be
2021-03-10 12:16:38 +00:00
Dmitriy Rabotyagov 59621889cc Define condition for the first play host one time
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: I63e9f830f086763f3dcb90cd54dbdebcfc679b1c
2020-09-16 11:55:26 +00:00
root d16298c411 Add CentOS-8 support
referencing ansible_python_interpreter to main.yml file to fix it.

Depends-On: https://review.opendev.org/710849
Change-Id: I196c263c7fb017a1d8386e8e9fb339af70165c51
2020-08-12 07:27:35 +00:00
root 18c54d7064 Add Centos-8 support
creating redhat-8.yml file for c8 support.

Change-Id: I60ed1a2415b4d145c3d4fc4207c30b384291a0e0
2020-07-02 17:06:51 +03:00
Jonathan Rosser 01975e0191 Remove deprecated packages from centos installs
See 634042cf25

Depends-On: https://review.opendev.org/695033
Change-Id: I0669b5c8762fa63675b2e4bdddbaa45a60fd0af6
2019-11-19 16:49:35 +00:00
Dirk Mueller 4463252de9 Remove python-systemd dependency
The Train packages have switched to python 3.x, so installing
python 2.x dependencies makes no sense.

Change-Id: I40f51cea93ae9297ba6c5f224c05a5d27f7c04f0
2019-09-18 16:50:13 +02:00
Dmitriy Rabotyagov af1cd0ac8f Convert dynamic includes to static imports
When task/role files are included using include_tasks, tags are not
passed to the included tasks. As a result, tags like swift-config
do not have the intended effect. This patch changes include_tasks
to import_tasks for all cases where dynamic vars or loops are not used
so that tags are properly handled.

Reference -
https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse.html
https://bugs.launchpad.net/openstack-ansible/+bug/1815043

Change-Id: I230a6b46d91b71881c91b1f4f93d03676a3a0afa
2019-08-07 18:55:14 +03:00
Jimmy McCrory a4de037651 Fix distro installs on Ubuntu
Install the python3-designate package and rely on the OSA provided
service configs instead of installing each of the individual designate
service packages. The 'Mask any conflicting units' task can also be
removed since the installation of unwanted services will no longer be an
issue.

Change-Id: I40a596803df656f5e6f75996660fe9ace685c2ed
2019-06-06 15:38:35 -07:00
Guilherme Steinmüller b59cad830d debian: add support
This patch adds the Debian jobs for this role to make sure
it's always passing as well as updates the meta to reflect
it's support of Debian accordingly.

Depends-On: Icc254aedb41b4090500c20103383681a17852171
Change-Id: I2c3063b38461d2b6998bf5f73418508daf2fb739
2019-04-11 13:43:26 +00:00
Jesse Pretorius c1e3248373 Remove unnecessary package install duplication
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.

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: I78a0df7ba62b59ea63ddceb76d47c9422235b9f3
2018-10-30 19:32:04 +00:00
Jesse Pretorius 112bbd9f6c Rename SUSE vars file to cater for any version
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.

Depends-On: https://review.openstack.org/602924
Change-Id: Ia52b84645acb6e584b757a355f1b6a45b0995f25
2018-09-16 01:55:33 +00:00
Jesse Pretorius faee049e24 Use a common python build/install role
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: I29833c41eba9b3ff80200b7f567a120f589e170e
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-09-03 11:10:39 +00:00
Kevin Carter 49ea5b4ea9 Convert role to use a common systemd service role
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>

Change-Id: I9764f557007d97cfcbe02abf7166cce423b39a31
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-08-01 11:52:57 +01:00
Jonathan Rosser ac5b664abd Use generic vars file for ubuntu
These vars work for both Xenial and Bionic

Change-Id: Ic37b8dd2eab185cd19cbc07b7ee310fc4f99512d
2018-08-01 09:28:03 +01:00
Mohammed Naser f9b74635a0 Use correct package for CentOS rndc
The package for rndc comes in bind and not in bind-utils under
CentOS.

Change-Id: Id25d0490e09b32997b02ad1dfe264c7dab6e57d4
2018-06-19 12:36:36 -04:00
Jonathan Rosser 88fea8355b Ensure rndc tool is available when rndc keys are used
Closes-Bug: 1721014
Change-Id: Ie9b039a9e4550bf11e2843e4ff886eacc46a4866
2018-05-30 18:52:26 +01:00
Markos Chandras 07d79cd0a0 Add support for using distribution packages for OpenStack services
Distributions provide packages for the OpenStack services so we add
support for using these instead of the pip ones.

Change-Id: Iab155254fa3600e1b6b3e8992f7c1fdc6f710ed6
Implements: blueprint openstack-distribution-packages
2018-05-18 17:16:11 +01:00
Markos Chandras 26950b3e55 Add support for the openSUSE Leap distributions
Add support for the openSUSE Leap distributions. Nothing special is
required for this except for adding the appropriate distro variables
file and also update the zypper cache before package installation.

Change-Id: I6dc2aa249c9935e5570509af08bb2aeba8afef76
2017-07-11 12:43:11 +01:00
Marc Gariepy 5ba88401eb Add CentOS support for os_designate
This commit add CentOS support to os_designate

Change-Id: Idfae25a8a769348da629bc0a4a79d1ee56d60aad
2017-01-27 16:34:54 +00:00
Andy McCrae 5a6d24ea90 Remove Trusty support from os_designate role
Change-Id: I7e0c3b72a556a62f805b0a6c15750032acfb076a
Implements: blueprint trusty-removal
2016-12-15 13:16:25 +00:00
Jesse Pretorius cbd6f0e31f Rename package lists (and related vars) appropriately
In order to make it easier to differentiate between the lists of
python packages, distribution packages, downloaded packages,
package pins and other similar variables the variable names are
being changed to ensure that they have a more explicit suffix
that defines the purpose and makes the naming more consistent.

This is to facilitate a lookup plugin which will be able to look
up all the package lists and present them as a consolidated piece
of data which may be used for artifact preparation.

Change-Id: Ia91feb054b825149da64a626e2060e362f66427c
2016-08-30 17:01:51 +01:00
Mike Carden cf5bb838e4 Implement Ubuntu 16.04 Xenial support
This change updates the os_designate role to support Ubuntu 16.04
and systemd in addition to Ubuntu 14.04 and upstart. Changes are
patterned on those made in the os_glance role.

Change-Id: I49b6271a2046b322b9ba57703331ad49aba1bc9d
Implements: blueprint support-ubuntu-1604
2016-07-13 09:53:43 +10:00
Matt Thompson c29b2d8d03 Remove bind9 and add functional tests
This commit moves the installation of bind9 to the tests, leaving the
installation/configuration of the desired DNS server to the deployer.
We can eventually use a role to handle the installation/configuration
of bind, but some further research will need to be done to isolate
the best role.

Additionally, this commit adds some very basic tests that validate the
Designate API.  Next steps involve using designate-tempest-plugin to
handle this.

NOTE: No relnote is being added for the removal of bind9 as no valid
      configuration was being dropped for bind9, meaning we had a
      non-functional DNS server as far as designate was concerned.

Change-Id: I5a21e32f8ad885afd5b4a04d2ef348cd65d0999b
2016-04-21 17:35:47 +01:00
Hector I Gonzalez a4f5657f27 Updated role using the Multi-Distro framework
* The default apt packages have been moved into a var file
  that is only loaded when the detected OS is matched.
* The Install task file has had the apt specific tasks moved
  into a named install task file.

Change-Id: I0b31d5d76d3aaedf3b87550165d0e670b314bebd
2016-04-18 16:56:43 -05:00
Jesse Pretorius a07a073cc1 Various changes to make convergence test work
- Ensure that rootwrap files are appropriately secured.
 - Implement sudoers to make rootwrap work.
 - Restructure tests to reduce duplication.
2016-03-14 12:34:48 +00:00
sharmaswati6 8d6686ef54 Initial commit 2016-03-14 12:34:10 +00:00