Galera improvements (#28)

* add galera cluster name

* add galera cluster stt method

* disable query cache only when mariadb is 10.0
pull/29/head
Clément 2018-07-14 11:33:43 +02:00 committed by Emilien Mantel
parent 60f87713fc
commit 8802c6d50d
2 changed files with 8 additions and 4 deletions

View File

@ -137,6 +137,7 @@ mariadb_key_ids: ['0xcbcb082a1bb943db', '0xf1656f24c74cd1d8']
mariadb_galera_resetup: false
mariadb_galera_members: []
mariadb_galera_primary_node: 'change_me' # See: https://github.com/ansible/ansible/issues/17453
mariadb_wsrep_stt_method: 'rsync'
# -------------------------------------
# Percona

View File

@ -12,9 +12,10 @@
wsrep_on=ON
wsrep_provider=/usr/lib/galera/libgalera_smm.so
wsrep_cluster_address=gcomm://{{ mariadb_galera_members | join(",") }}
# TODO: https://mariadb.com/kb/en/mariadb/galera-cluster-system-variables/#wsrep_sst_method
wsrep_sst_method=rsync
# TODO: wsrep_cluster_name="my_wsrep_cluster"
wsrep_sst_method="{{ mariadb_wsrep_stt_method }}"
{% if mariadb_wsrep_cluster_name is defined %}
wsrep_cluster_name="{{ mariadb_wsrep_cluster_name }}"
{% endif %}
# Node Configuration
wsrep_node_address="{{ mariadb_wsrep_node_address | default(ansible_default_ipv4.address) }}"
@ -28,4 +29,6 @@ binlog_format=ROW
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
innodb_doublewrite=1
{% if mariadb_version == '10.0'%}
query_cache_size=0
{% endif %}