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:
parent
10ca998f9e
commit
528bb2271c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue