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.