diff --git a/deployment/puppet/galera/manifests/galera_master_final_config.pp b/deployment/puppet/galera/manifests/galera_master_final_config.pp index a0b16f8153..ef58f58718 100644 --- a/deployment/puppet/galera/manifests/galera_master_final_config.pp +++ b/deployment/puppet/galera/manifests/galera_master_final_config.pp @@ -2,7 +2,7 @@ class galera::galera_master_final_config($master_ip, $node_addresses) { # This class changes config file on first Galera node to allow safe restart of this node without leaving cluster. if ! $master_ip { - $galera_gcomm_string = inline_template("<%= @node_addresses.collect {|ip| ip + ':' + 4567.to_s }.join ',' %>") + $galera_gcomm_string = inline_template("<%= @node_addresses.reject{|ip| ip == hostname }.collect {|ip| ip + ':' + 4567.to_s }.join ',' %>") $check_galera = "show status like 'wsrep_cluster_size';" $mysql_user = $::galera::params::mysql_user $mysql_password = $::galera::params::mysql_password diff --git a/deployment/puppet/galera/templates/wsrep.cnf.erb b/deployment/puppet/galera/templates/wsrep.cnf.erb index c633e3a199..0857d36ea0 100644 --- a/deployment/puppet/galera/templates/wsrep.cnf.erb +++ b/deployment/puppet/galera/templates/wsrep.cnf.erb @@ -53,9 +53,9 @@ wsrep_provider_options="pc.ignore_sb = no;ist.recv_addr=<%= node_address %>;gmca wsrep_cluster_name="<%= cluster_name -%>" <% if setup_multiple_gcomm -%> <% if master_ip -%> -wsrep_cluster_address="gcomm://<%= @node_addresses.collect {|ip| ip + ':' + 4567.to_s }.join ',' %>" +wsrep_cluster_address="gcomm://<%= @node_addresses.reject{|ip| ip == hostname }.collect {|ip| ip + ':' + 4567.to_s }.join ',' %>" <% else -%> - wsrep_cluster_address="gcomm://" +wsrep_cluster_address="gcomm://" <% end -%> <% else -%> <% if master_ip -%>