Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Was a bit over-zealous before. First time working on an open source project, sent a pull request before it was ready.
I was going to request a pull to development, but your development branch looks like it needs a sync to your master branch badly.
This works well now. Sample configuration below.
node /^db-\d+\.example\.com$/ { $svr_idx = regsubst($fqdn, '^db-(\d+)\.example\.com', '\1') # Install the cluster database server # Just YAML this and use hiera class { 'percona': server => 'true', cluster => 'true', cluster_index => $svr_idx, cluster_name => 'db-cluster', cluster_node_name => $hostname, cluster_address => $svr_idx ? { 1 => 'gcomm://', default => 'gcomm://db-1.example.com', }, cluster_replication_user => 'cluster', cluster_replication_password => 'cluster_password', targetdir => '/var/lib/mysql/backup', # Set as below to install Percona-XtraDB-Cluster-common # Otherwise leave undef, or you can't install redhat-lsb # pkg_compat => false, manage_repo => 'true', # Required. If /etc/my.cnf is root:root, xtrabackup fails # as it tries to reread the file as user mysql config_user => 'mysql', config_group => 'mysql', # Do this if /var/lib/mysql is a mount point datadir => '/var/lib/mysql/db/', configuration => { # Query cache is currently disabled with wsrep # 'mysqld/query_cache_size' => '16M', # 'mysqld/query_cache_limit' => '8M', # 'mysqld/query_cache_type' => '1', 'mysqld/max_connections' => '536', 'mysqld/interactive_timeout' => '300', 'mysqld/wait_timeout' => '300', 'mysqld/connect_timeout' => '10', 'mysqld/thread_cache_size' => '512', 'mysqld/expire_logs_days' => '30', 'mysqld/max_binlog_size' => '256M', 'mysqld/table_cache' => '1024', # 'mysqld/table_open_cache' => '512', 'mysqld/table_definition_cache' => '1024', 'mysqld/auto_increment_offset' => $svr_idx, # Should be at least 2x the number of cores, # or 1/4 the number of writing client connections # the other nodes have # Set to 1 if you have ANY tables without primary keys! # Tables without primary keys make MySQL slow, so fix that... 'mysqld/wsrep_slave_threads' => '1', # This attempts to retry the commit 4 times if there's a deadlock 'mysqld/wsrep_retry_autocommit' => '4', }, } file { '/var/lib/mysql/backup': ensure => directory, mode => 'ug+rwX,o=r,o-x', owner => 'mysql', group => 'mysql', } }