Add haproxy_endpoints role to Galera

Add a role which implements a general "Manage LB" listener which
will manage endpoint states in the haproxy servers when restarts
are notified for the mariadb servers.

Change-Id: I13c1e726cd9d182f0652c37f57adf36a3b2ad3aa
This commit is contained in:
Logan V 2017-09-09 20:50:52 -05:00
parent 9b9dde4745
commit 3c235fda0e
3 changed files with 16 additions and 0 deletions

View File

@ -202,3 +202,7 @@
scm: git
src: https://git.openstack.org/openstack/openstack-ansible-os_tacker
version: master
- name: haproxy_endpoints
scm: git
src: https://github.com/logan2211/ansible-haproxy-endpoints
version: master

View File

@ -26,3 +26,7 @@ galera_container_bind_mounts:
# Disable PrivateDevices for MariaDB on CentOS 7
# See https://bugs.launchpad.net/openstack-ansible/+bug/1697531 for details.
galera_disable_privatedevices: "{{ ((properties.is_metal | default(false)) | bool) | ternary('false', 'true') }}"
# Galera sessions are long lived, so if we do endpoint maintenance we will
# force kill the sessions to force a failover to the active endpoint.
haproxy_shutdown_sessions: yes

View File

@ -50,7 +50,15 @@
max_fail_percentage: 20
user: root
roles:
- role: haproxy_endpoints
haproxy_state: disabled
static: no
when: "{{ groups['haproxy'] | default([]) | length > 0 }}"
- role: "galera_server"
- role: haproxy_endpoints
haproxy_state: enabled
static: no
when: "{{ groups['haproxy'] | default([]) | length > 0 }}"
- role: "rsyslog_client"
rsyslog_client_log_rotate_file: galera_log_rotate
rsyslog_client_log_dir: "/var/log/mysql_logs"