kolla-ansible/ansible/roles/mariadb/templates/galera.cnf.j2
Sam Yaple cf3fd4043a Update mariadb confs and ports
Cleanup all options in galera.cnf. Bind to all interfaces and ports
appropriately.

Change-Id: I516613d09673ba61aadda2c7bbb4abbbe4ea47ac
Partially-Implements: blueprint update-configs
Closes-Bug: #1478330
2015-08-13 02:27:38 +00:00

22 lines
1.2 KiB
Django/Jinja

[mysqld]
bind-address={{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
port={{ mariadb_port }}
binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
wsrep_cluster_address=gcomm://{% if (groups['mariadb'] | length) > 1 %}{% for host in groups['mariadb'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ mariadb_wsrep_port }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %}
wsrep_provider_options="gmcast.listen_addr=tcp://{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ mariadb_wsrep_port }};ist.recv_addr={{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ mariadb_ist_port }}"
wsrep_node_address={{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ mariadb_wsrep_port }}
wsrep_sst_receive_address={{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ mariadb_sst_port }}
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_name="{{ database_cluster_name }}"
wsrep_node_name={{ ansible_hostname }}
wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth={{ database_user }}:{{ database_password }}
wsrep_slave_threads=4