Skip to content
Snippets Groups Projects
Commit 908bffcf authored by yj.bai's avatar yj.bai Committed by Radosław Piliszek
Browse files

Fix MariaDB galera IPv6 deployment on CentOS 7


CentOS 7 uses old galera which has multiple issues handling
IPv6 addressing.
This patch applies two workarounds for CentOS 7.

Co-Authored-By: default avatarJeffrey Zhang <jeffrey.zhang@99cloud.net>
Co-Authored-By: default avatarRadosław Piliszek <radoslaw.piliszek@gmail.com>
Change-Id: I7c178aba60c389e65075e0e6cbe4dfa5b8ce06ec
Closes-Bug: #1856532
Signed-off-by: default avataryj.bai <bai.yongjun@99cloud.net>
parent 8e4556f0
No related branches found
No related tags found
No related merge requests found
...@@ -28,10 +28,23 @@ datadir=/var/lib/mysql/ ...@@ -28,10 +28,23 @@ datadir=/var/lib/mysql/
wsrep_cluster_address=gcomm://{% if (groups['mariadb'] | length) > 1 %}{% for host in groups['mariadb'] %}{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ mariadb_wsrep_port }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %} wsrep_cluster_address=gcomm://{% if (groups['mariadb'] | length) > 1 %}{% for host in groups['mariadb'] %}{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ mariadb_wsrep_port }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %}
{% if api_address_family == 'ipv6' and kolla_base_distro == 'centos' %}
# FIXME(jeffrey4l): Revert when using C8 (CentOS+Ussuri)
# Use [::] to avoid galera issue.
# for more info see https://github.com/codership/galera/issues/534#issuecomment-472607544
wsrep_provider_options=gmcast.listen_addr=tcp://[::]:{{ mariadb_wsrep_port }};ist.recv_addr={{ api_interface_address | put_address_in_context('url') }}:{{ mariadb_ist_port }}
{% else %}
wsrep_provider_options=gmcast.listen_addr=tcp://{{ api_interface_address | put_address_in_context('url') }}:{{ mariadb_wsrep_port }};ist.recv_addr={{ api_interface_address | put_address_in_context('url') }}:{{ mariadb_ist_port }} wsrep_provider_options=gmcast.listen_addr=tcp://{{ api_interface_address | put_address_in_context('url') }}:{{ mariadb_wsrep_port }};ist.recv_addr={{ api_interface_address | put_address_in_context('url') }}:{{ mariadb_ist_port }}
{% endif %}
wsrep_node_address={{ api_interface_address | put_address_in_context('url') }}:{{ mariadb_wsrep_port }} wsrep_node_address={{ api_interface_address | put_address_in_context('url') }}:{{ mariadb_wsrep_port }}
{% if api_address_family == 'ipv6' and kolla_base_distro == 'centos' %}
# FIXME(yj.bai): Revert when using C8 (CentOS+Ussuri)
# Use IPv6-resolvable hostname to avoid galera issue.
wsrep_sst_receive_address={{ ansible_hostname }}:{{ mariadb_sst_port }}
{% else %}
wsrep_sst_receive_address={{ api_interface_address | put_address_in_context('url') }}:{{ mariadb_sst_port }} wsrep_sst_receive_address={{ api_interface_address | put_address_in_context('url') }}:{{ mariadb_sst_port }}
{% endif %}
wsrep_provider={{ wsrep_driver }} wsrep_provider={{ wsrep_driver }}
wsrep_cluster_name="{{ database_cluster_name }}" wsrep_cluster_name="{{ database_cluster_name }}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment