Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wsrep_sst_method #7

Merged
merged 2 commits into from
May 3, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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