Add corosync/pacemaker installation

Masakari hostmonitors require corosync cluster to be present for their
proper work. There's already a role for the deployment, so we can simply
make us of it and integrate with masakari playbook.

Needed-By: https://review.opendev.org/744673
Change-Id: I24fa44a6c3e8feeb8a7581663b53343b9c881145
This commit is contained in:
Dmitriy Rabotyagov 2020-07-03 00:13:58 +03:00 committed by Dmitriy Rabotyagov (noonedeadpunk)
parent f4cfe5f7e6
commit 7632df34d4
8 changed files with 58 additions and 2 deletions

View File

@ -283,6 +283,11 @@
src: https://github.com/logan2211/ansible-haproxy-endpoints
version: master
trackbranch: master
- name: pacemaker_corosync
scm: git
src: https://github.com/noonedeadpunk/ansible-pacemaker-corosync
trackbranch: master
version: master
- name: nspawn_container_create
src: https://opendev.org/openstack/openstack-ansible-nspawn_container_create
scm: git

View File

@ -2,3 +2,7 @@
masakari-infra_hosts:
aio1:
ip: 172.29.236.100
masakari-monitor_hosts:
aio1:
ip: 172.29.236.100

View File

@ -7,3 +7,12 @@ masakari-infra_hosts:
ip: 172.20.236.112
infra3:
ip: 172.20.236.113
# The infra nodes that will be running the masakari monitors
masakari-monitor_hosts:
infra1:
ip: 172.20.236.111
infra2:
ip: 172.20.236.112
infra3:
ip: 172.20.236.113

View File

@ -0,0 +1,16 @@
---
# Copyright 2020, Dmitriy Rabotyagov <noonedeadpunk@ya.ru>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
masakari_monitor_corosync_multicast_interface: "br-mgmt"

View File

@ -19,6 +19,18 @@
tags:
- always
- name: Setup corosync cluster
hosts: masakari_monitor
gather_facts: false
user: root
vars:
pacemaker_corosync_group: masakari_monitor
pacemaker_corosync_ring_interface: "{{ masakari_monitor_corosync_multicast_interface }}"
haveged_enabled: false
roles:
- role: "pacemaker_corosync"
tags: pacemaker-corosync
- name: Install the masakari components
hosts: masakari_all
gather_facts: false

View File

@ -0,0 +1,7 @@
---
features:
- |
OpenStack-Ansible now provided corosync and pacemaker cluster setup as part
of the os-masakari-install playbook. Corosync/pacemaker cluster is required
for the proper work of masakari hostmonitors, as they identify hosts state
with help of corosync.

View File

@ -40,6 +40,7 @@ COMMON_ETC_LOG_NAMES="apt \
apache2 \
auditd \
calico \
corosync \
ceph \
etcd \
ganesha \
@ -53,6 +54,7 @@ COMMON_ETC_LOG_NAMES="apt \
network \
nginx \
openstack_deploy \
pacemaker \
pip.conf \
qpid-dispatch \
rabbitmq \

View File

@ -312,6 +312,7 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
'masakari-infra_containers',
'masakari-infra_hosts',
'masakari_monitor',
'masakari-monitor_all',
'masakari-monitor_containers',
'masakari_monitors_container',
'masakari-monitor_hosts',