percona cluster nodes should be sorted
* the nodes written to the my.conf returned from search should be sorted to avoid restarting mysql just because reordering the nodes in the template Change-Id: I3cd70ca818be18f926b384feb1a592cb3b137ccd
This commit is contained in:
parent
856c3a24ab
commit
794dc2050a
|
@ -41,7 +41,7 @@ node.normal['percona']['cluster']['wsrep_provider_options'] = "\"gmcast.listen_a
|
||||||
# query_cache is not supported with wsrep
|
# query_cache is not supported with wsrep
|
||||||
node.normal['percona']['server']['query_cache_size'] = 0
|
node.normal['percona']['server']['query_cache_size'] = 0
|
||||||
# find all nodes in the percona cluster
|
# find all nodes in the percona cluster
|
||||||
cluster_nodes = search(:node, 'recipes:"percona\:\:cluster"')
|
cluster_nodes = search(:node, 'recipes:"percona\:\:cluster"').sort
|
||||||
# if it's the first node make sure that wsrep_cluster_address is set to nothing to be able to bootstrap.
|
# if it's the first node make sure that wsrep_cluster_address is set to nothing to be able to bootstrap.
|
||||||
is_first_node = cluster_nodes.empty? || (cluster_nodes.size == 1 && cluster_nodes.first['fqdn'] == node['fqdn'])
|
is_first_node = cluster_nodes.empty? || (cluster_nodes.size == 1 && cluster_nodes.first['fqdn'] == node['fqdn'])
|
||||||
if is_first_node
|
if is_first_node
|
||||||
|
|
Loading…
Reference in New Issue