9f578c85e0
Adds HAcluster Ansible role. This role contains High Availability clustering solution composed of Corosync, Pacemaker and Pacemaker Remote. HAcluster is added as a helper role for Masakari which requires it for its host monitoring, allowing to provide HA to instances on a failed compute host. Kolla hacluster images merged in [1]. [1] https://review.opendev.org/#/c/668765/ Change-Id: I91e5c1840ace8f567daf462c4eb3ec1f0c503823 Implements: blueprint ansible-pacemaker-support Co-Authored-By: Radosław Piliszek <radoslaw.piliszek@gmail.com> Co-Authored-By: Mark Goddard <mark@stackhpc.com>
25 lines
846 B
YAML
25 lines
846 B
YAML
---
|
|
- name: Get container facts
|
|
become: true
|
|
kolla_container_facts:
|
|
name:
|
|
- hacluster_pacemaker_remote
|
|
register: container_facts
|
|
|
|
# NOTE(yoctozepto): Corosync runs over UDP so one cannot use wait_for to check
|
|
# for it being up or down (TCP-only). In fact, such prechecks should only really
|
|
# check if the port is taken already by the host and not contact it.
|
|
|
|
# NOTE(yoctozepto): The below is a slight simplification because
|
|
# pacemaker_remoted always listens on all addresses (wildcard listen).
|
|
- name: Check free port for Pacemaker Remote
|
|
wait_for:
|
|
host: "{{ api_interface_address }}"
|
|
port: "{{ hacluster_pacemaker_remote_port }}"
|
|
connect_timeout: 1
|
|
timeout: 1
|
|
state: stopped
|
|
when:
|
|
- container_facts['hacluster_pacemaker_remote'] is not defined
|
|
- inventory_hostname in groups['hacluster-remote']
|