Browse Source

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
Jan Klare 3 years ago
parent
commit
794dc2050a
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      recipes/percona-cluster-server.rb

+ 1
- 1
recipes/percona-cluster-server.rb View File

@@ -41,7 +41,7 @@ node.normal['percona']['cluster']['wsrep_provider_options'] = "\"gmcast.listen_a
41 41
 # query_cache is not supported with wsrep
42 42
 node.normal['percona']['server']['query_cache_size'] = 0
43 43
 # find all nodes in the percona cluster
44
-cluster_nodes = search(:node, 'recipes:"percona\:\:cluster"')
44
+cluster_nodes = search(:node, 'recipes:"percona\:\:cluster"').sort
45 45
 # if it's the first node make sure that wsrep_cluster_address is set to nothing to be able to bootstrap.
46 46
 is_first_node = cluster_nodes.empty? || (cluster_nodes.size == 1 && cluster_nodes.first['fqdn'] == node['fqdn'])
47 47
 if is_first_node

Loading…
Cancel
Save