On single nodes use an empty cluster address

When there is only one galera node, configure galera with an empty
cluster address. Each time the mysql service starts on this node it will
automatically create a new cluster.

Closes-Bug: #1624327
Closes-Bug: #1595143
Change-Id: If653b1aacbd446a4ea5bb806a839dad40011b5b8
(cherry picked from commit 21885c1f37)
This commit is contained in:
Jimmy McCrory 2016-10-05 15:59:11 -07:00 committed by vnogin
parent 10ca998f9e
commit 528bb2271c
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ galera_innodb_log_buffer_size: 128M
## wsrep configuration
galera_wsrep_address: "{{ ansible_ssh_host }}"
galera_wsrep_cluster_address: "{% for host in galera_cluster_members %}{{ hostvars[host]['ansible_ssh_host'] }}{% if not loop.last %},{% endif %}{% endfor %}"
galera_wsrep_cluster_address: "{% if galera_cluster_members | length > 1 %}{% for host in galera_cluster_members %}{{ hostvars[host]['ansible_ssh_host'] }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %}"
galera_wsrep_node_incoming_address: "{{ galera_wsrep_address }}"
galera_wsrep_slave_threads: "{{ ansible_processor_vcpus | default(2) }}"
galera_wsrep_retry_autocommit: 3