Merge "Use proxy protocol v2 to send client info to galera backend servers"

This commit is contained in:
Zuul 2022-09-07 11:30:17 +00:00 committed by Gerrit Code Review
commit 32398bf7a1
2 changed files with 12 additions and 0 deletions

View File

@ -38,6 +38,16 @@ galera_monitoring_allowed_source: >-
| join(' ') ~ ' 127.0.0.1'
}}
# Accept PROXY protocol information from the load balancers
# See https://mariadb.com/kb/en/proxy-protocol-support for details
galera_server_proxy_protocol_networks: >-
{{
groups['haproxy']
| map('extract', hostvars, 'ansible_host')
| list
| join(',') ~ ', localhost, ::1'
}}
# 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

@ -168,6 +168,8 @@ haproxy_galera_service:
haproxy_timeout_server: 5000s
haproxy_backend_options:
- "httpchk HEAD / HTTP/1.0\\r\\nUser-agent:\\ osa-haproxy-healthcheck"
haproxy_backend_server_options:
- "send-proxy-v2"
haproxy_allowlist_networks: "{{ haproxy_galera_allowlist_networks }}"
haproxy_service_enabled: "{{ groups['galera_all'] is defined and groups['galera_all'] | length > 0 }}"