Merge "galera: set wait_prim to true and bootstrap master node"
This commit is contained in:
commit
875872b9f4
|
@ -228,4 +228,16 @@ class galera($cluster_name, $master_ip = false, $node_address = $ipaddress_eth0,
|
|||
tries => 6,
|
||||
}
|
||||
|
||||
if ! $master_ip
|
||||
{
|
||||
exec { "bootstrap-galera" :
|
||||
require => [Service['mysql-galera']],
|
||||
subscribe => [Service['mysql-galera']],
|
||||
before => [Exec['wait-for-synced-state']],
|
||||
logoutput => true,
|
||||
command => "/usr/bin/mysql -Nbe \"SET GLOBAL wsrep_provider_options='pc.bootstrap=1'\"",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -44,12 +44,15 @@ wsrep_provider=<%= libgalera_prefix %>/galera/libgalera_smm.so
|
|||
# Provider specific configuration options
|
||||
|
||||
# See http://www.codership.com/wiki/doku.php?id=faq
|
||||
|
||||
|
||||
|
||||
wsrep_provider_options="pc.ignore_sb = no"
|
||||
|
||||
# Logical cluster name. Should be the same for all nodes.
|
||||
wsrep_cluster_name="<%= cluster_name -%>"
|
||||
<% if setup_multiple_gcomm -%>
|
||||
wsrep_cluster_address="gcomm://<%= @node_addresses.collect {|ip| ip + ':' + 4567 }.join ',' %>"
|
||||
wsrep_cluster_address="gcomm://<%= @node_addresses.collect {|ip| ip + ':' + 4567 }.join ',' %>?pc.wait_prim=yes"
|
||||
<% else -%>
|
||||
<% if master_ip -%>
|
||||
wsrep_cluster_address="gcomm://<%= master_ip %>:4567"
|
||||
|
|
Loading…
Reference in New Issue