From ea36bbf1d12404a4bbe456a2f6dd54037b0509bc Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Fri, 14 Feb 2020 11:41:30 +0100 Subject: [PATCH] Allow setting additional galera WSREP options Change-Id: I26206bece95d31c0182e75f2a585c50d6f0fad6f --- ansible/roles/mariadb/defaults/main.yml | 5 +++++ ansible/roles/mariadb/templates/galera.cnf.j2 | 4 ++-- etc/kolla/globals.yml | 6 ++++++ ...riadb_wsrep_extra_provider_options-27c2804e4505aed1.yaml | 5 +++++ 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/mariadb_wsrep_extra_provider_options-27c2804e4505aed1.yaml diff --git a/ansible/roles/mariadb/defaults/main.yml b/ansible/roles/mariadb/defaults/main.yml index 9677efda40..e9ea5daced 100644 --- a/ansible/roles/mariadb/defaults/main.yml +++ b/ansible/roles/mariadb/defaults/main.yml @@ -69,6 +69,11 @@ mariadb_extra_volumes: "{{ default_extra_volumes }}" ######################################## mariadb_service: "{{ mariadb_services['mariadb'] }}" +############### +# WSREP options +############### +mariadb_wsrep_extra_provider_options: [] + #################### # Backups #################### diff --git a/ansible/roles/mariadb/templates/galera.cnf.j2 b/ansible/roles/mariadb/templates/galera.cnf.j2 index cf8ce613bd..4e59073feb 100644 --- a/ansible/roles/mariadb/templates/galera.cnf.j2 +++ b/ansible/roles/mariadb/templates/galera.cnf.j2 @@ -32,9 +32,9 @@ wsrep_cluster_address=gcomm://{% if (groups['mariadb'] | length) > 1 %}{% for ho # 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 }} +wsrep_provider_options=gmcast.listen_addr=tcp://[::]:{{ mariadb_wsrep_port }};ist.recv_addr={{ api_interface_address | put_address_in_context('url') }}:{{ mariadb_ist_port }};{% for option in mariadb_wsrep_extra_provider_options %}{{ option }}{% if not loop.last %};{% endif %}{% endfor %} {% 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 }};{% for option in mariadb_wsrep_extra_provider_options %}{{ option }}{% if not loop.last %};{% endif %}{% endfor %} {% endif %} wsrep_node_address={{ api_interface_address | put_address_in_context('url') }}:{{ mariadb_wsrep_port }} diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index 1f190866cb..1ed096b563 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -362,6 +362,12 @@ # to configure IPv6 in RabbitMQ server. #rabbitmq_server_additional_erl_args: "" +################# +# MariaDB options +################# +# List of additional WSREP options +#mariadb_wsrep_extra_provider_options: [] + ####################### # External Ceph options ####################### diff --git a/releasenotes/notes/mariadb_wsrep_extra_provider_options-27c2804e4505aed1.yaml b/releasenotes/notes/mariadb_wsrep_extra_provider_options-27c2804e4505aed1.yaml new file mode 100644 index 0000000000..d30cdcc126 --- /dev/null +++ b/releasenotes/notes/mariadb_wsrep_extra_provider_options-27c2804e4505aed1.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Introduce new configuration variable `mariadb_wsrep_extra_provider_options` + allowing users to set additional WSREP options.