Commit Graph

16 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 9b16df267a 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.

Change-Id: I49f9a18430f4912fe3e2fda36da6ad2acf6dde35
2023-10-20 12:32:00 +00:00
Dmitriy Rabotyagov fc0da79db5 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: I7163d2e68b1f0f97bd31d7734a99f74ed60b1bb5
2023-07-14 18:33:14 +02:00
Jonathan Rosser 9b4ac49fa9 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: Ia712d170740c748002aa44d921ade8750997f8f0
2021-05-18 12:39:00 +00:00
Dmitriy Rabotyagov 6c127934e9 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: Iadca3596f21f83bdb090c8bf45b323bf04154e92
2020-09-16 13:50:31 +00:00
Dmitriy Rabotyagov 9a80d520bd Add CentOS 8 support
Change-Id: I5b5db9f15b4d6efd139e25e03f47856875b907b6
2020-08-04 10:14:22 +00:00
Dmitriy Rabotyagov 3f5f393d22 Use openstack_venv_python_executable
Make masakari respect set openstack_venv_python_executable
This also will create py3 venvs by default

Change-Id: I9d7abbeff0f68cad3b646cde270437c88554080c
2020-05-06 12:22:36 +03:00
Dmitriy Rabotyagov 4f8966a231 Use py3 for CentOS
Unfortunatelly CentOS 7 do not have libvirt library
for py3, so instead of symlinking them, we have to install devel package
and build inside venv.

Change-Id: I5a2fc38e86debfb9a73394552b79f83e56dd1231
2020-01-03 17:53:32 +02:00
Dmitriy Rabotyagov a26ed9d5c4 Add libvirt-devel installation
libvirt-python package is required by masakari-monitors, however it
can't be build without libvirt-devel.
Afterwards we should replace it with symlink from distro.

Without libvirt-devel installation of masakari-monitors fails [1]

[1] http://paste.openstack.org/show/767655/

Change-Id: I366e754bbc32f07bfc3166c119fec7141bd2e904
2019-08-30 17:22:00 +00:00
Guilherme Steinmüller 7e13e5dffd 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: I9a92b73c419a0dc1cca40dacfef75de61a61db94
Change-Id: I520e73efeea6d9407ebaaf932a5c532ed36ee7c4
2019-04-09 17:01:01 +00:00
Dmitriy Rabotjagov 4c7fb49c2b Rename masakari_venv_pip_packages to exclude from repo_build process
Variable masakari_venv_pip_packages was renamed in order to exclude from
repo-build process, as it fails in case of Jinja inside *_pip_packages.

As this variable collects all other *_pip_packages lists, repo_build
will still have all mentioned packages, so it's safe to rename this var.

Change-Id: Ib33d7bc83f1428763f873e1155fd9e3eb4c937e4
2019-03-21 20:16:40 +02:00
Dmitriy Rabotjagov d0e8674f92 Basic implementation of masakari-monitors
With this change masakari-monitors will be installed on hosts
which are in group masakari-monitor (supposed to be nova compute hosts)

hostmonitor depends on pacemaker with corosync, which are implemented by
https://github.com/mit-scripts/ansible-pacemaker-corosync

Masakari api/engine config was simplified and unneccesary defaults
were removed from it.

Role now uses default ``systemd_service`` role for systemctl configuration

Co-Authored-By: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
Implements: blueprint masakari-ansible-plugin
Change-Id: I334877c0111a45d3f3a74e7f56931786f4301713
2018-11-06 19:46:53 +02:00
Zuul d0bfa55df7 Merge "Drop un-used packages from role" 2018-09-27 03:45:03 +00:00
Jesse Pretorius 18e6a087d3 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: Ia01373e97a98f59af9bddd8c94492baf6886ac45
2018-09-16 01:55:50 +00:00
wangqi 11f7109929 Drop un-used packages from role
Change-Id: I76a08c5637d427a79d2b7390c1ee0154f44115d6
2018-09-07 07:56:15 +00:00
Jesse Pretorius 8585cb3d3a Move MQ vhost/user creation into role
There is no record for why we implement the MQ vhost/user creation
outside of the role in the playbook, when we could do it inside the
role.

Implementing it inside the role allows us to reduce the quantity of
group_vars duplicated from the role, and allows us to better document
the required variables in the role. The delegation can still be done
as it is done in the playbook too.

In this patch we implement two new variables:
- masakari_oslomsg_rpc_setup_host
- masakari_oslomsg_notify_setup_host

These are used in the role to allow delegation of the MQ vhost/user
setup for each type to any host, but they default to using the first
member of the applicable oslomsg host group.

We also adjust some of the defaults to automatically inherit existing
vars set in group_vars form the integrated build so that we do not
need to do the wiring in the integrated build's group vars. We still
default them in the role too for independent role usage.

Finally, we remove the test mq setup tasks and clean up any unused
or unnecessary variables configured in tests.

We also rename the ubuntu-16.04.yml file to ubuntu.yml to cover both
xenial and bionic. This has become necessary because the
'Gather variables for each operating system' task in the galera_client
role is picking up this role's vars file instead of its own.

Change-Id: Ibf05d527b6dbed8a10ecf0b64cfb161b66295d35
2018-08-01 18:52:35 +01:00
nirajsingh 130e4c0e29 First commit 2018-04-16 17:02:09 +05:30