Skip to content

Commit

Permalink
Merge pull request #7 from rickerc/add_ubuntu
Browse files Browse the repository at this point in the history
Add wsrep_sst_method
  • Loading branch information
michaeltchapman committed May 3, 2014
2 parents 90b7484 + abfe1a0 commit d342cf6
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
12 changes: 12 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@
# state transfer
# Defaults to 4568
#
# [*wsrep_sst_method*]
# (optional) The method to use for state snapshot transfer
# between nodes
# Defaults to rsync
# xtrabackup, xtrabackup-v2, mysqldump, and skip options are also
# accepted
# Note that rsync 3.10 is incompatible with Percona XtraDB 5.5
# currently (see launchpad bug #1315528). xtrabackup-v2 is the
# recommended solution when using Percona XtraDB on platforms such as
# Ubuntu trusty which provide rsync 3.10
#
# [*root_password*]
# (optional) The mysql root password.
# Defaults to 'test'
Expand Down Expand Up @@ -76,6 +87,7 @@
$wsrep_group_comm_port = 4567,
$wsrep_state_transfer_port = 4444,
$wsrep_inc_state_transfer_port = 4568,
$wsrep_sst_method = 'rsync',
$root_password = 'test',
$override_options = {},
$vendor_type = 'percona',
Expand Down
22 changes: 21 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,34 @@
else {
fail('This distribution is not supported by the puppet-galera module')
}

# add auth credentials for SST methods which need them:
# mysqldump, xtrabackup, and xtrabackup-v2
if ($galera::wsrep_sst_method in [ 'skip', 'rsync' ]) {
$wsrep_sst_auth = undef
}
elsif ($galera::wsrep_sst_method in
[ 'mysqldump',
'xtrabackup',
'xtrabackup-v2' ])
{
$wsrep_sst_auth = "root:${galera::root_password}"
}
else {
$wsrep_sst_auth = undef
warning("wsrep_sst_method of ${galera::wsrep_sst_method} not recognized")
}


$default_options = {
'mysqld' => {
'bind-address' => $galera::bind_address,
'wsrep_node_address' => $galera::local_ip,
'wsrep_provider' => $galera::params::libgalera_location,
'wsrep_cluster_address' => "gcomm://${server_csl}",
'wsrep_slave_threads' => '8',
'wsrep_sst_method' => 'rsync',
'wsrep_sst_method' => $galera::wsrep_sst_method,
'wsrep_sst_auth' => $wsrep_sst_auth,
'binlog_format' => 'ROW',
'default_storage_engine' => 'InnoDB',
'innodb_locks_unsafe_for_binlog' => '1',
Expand Down
1 change: 1 addition & 0 deletions spec/classes/galera_init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
:wsrep_group_comm_port => 4567,
:wsrep_state_transfer_port => 4444,
:wsrep_inc_state_transfer_port => 4568,
:wsrep_sst_method => 'rsync',
:root_password => 'test',
:override_options => {},
:vendor_type => 'percona',
Expand Down

0 comments on commit d342cf6

Please sign in to comment.