Galera improvements (#28)
* add galera cluster name * add galera cluster stt method * disable query cache only when mariadb is 10.0pull/29/head
parent
60f87713fc
commit
8802c6d50d
|
@ -137,6 +137,7 @@ mariadb_key_ids: ['0xcbcb082a1bb943db', '0xf1656f24c74cd1d8']
|
||||||
mariadb_galera_resetup: false
|
mariadb_galera_resetup: false
|
||||||
mariadb_galera_members: []
|
mariadb_galera_members: []
|
||||||
mariadb_galera_primary_node: 'change_me' # See: https://github.com/ansible/ansible/issues/17453
|
mariadb_galera_primary_node: 'change_me' # See: https://github.com/ansible/ansible/issues/17453
|
||||||
|
mariadb_wsrep_stt_method: 'rsync'
|
||||||
|
|
||||||
# -------------------------------------
|
# -------------------------------------
|
||||||
# Percona
|
# Percona
|
||||||
|
|
|
@ -12,9 +12,10 @@
|
||||||
wsrep_on=ON
|
wsrep_on=ON
|
||||||
wsrep_provider=/usr/lib/galera/libgalera_smm.so
|
wsrep_provider=/usr/lib/galera/libgalera_smm.so
|
||||||
wsrep_cluster_address=gcomm://{{ mariadb_galera_members | join(",") }}
|
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="{{ mariadb_wsrep_stt_method }}"
|
||||||
wsrep_sst_method=rsync
|
{% if mariadb_wsrep_cluster_name is defined %}
|
||||||
# TODO: wsrep_cluster_name="my_wsrep_cluster"
|
wsrep_cluster_name="{{ mariadb_wsrep_cluster_name }}"
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
# Node Configuration
|
# Node Configuration
|
||||||
wsrep_node_address="{{ mariadb_wsrep_node_address | default(ansible_default_ipv4.address) }}"
|
wsrep_node_address="{{ mariadb_wsrep_node_address | default(ansible_default_ipv4.address) }}"
|
||||||
|
@ -28,4 +29,6 @@ binlog_format=ROW
|
||||||
default_storage_engine=InnoDB
|
default_storage_engine=InnoDB
|
||||||
innodb_autoinc_lock_mode=2
|
innodb_autoinc_lock_mode=2
|
||||||
innodb_doublewrite=1
|
innodb_doublewrite=1
|
||||||
|
{% if mariadb_version == '10.0'%}
|
||||||
query_cache_size=0
|
query_cache_size=0
|
||||||
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue