[galera] Some master/slave tweaks
This adds some tweaks for galera master/slave setup It also allows to customize the galera gcache size, This value depends mainly of the database traffic. But the default value of 128M is clearly to low for us, this means if a down node comeback and the data that need to be transfered is greater than 128MB a full sync if done instead of an incremental. So we use 1G by default and that should changed in case of a deployement with a big database workload.
This commit is contained in:
parent
24bd6bc3d8
commit
253aaeb138
@ -26,6 +26,7 @@ class cloud::database::sql (
|
||||
$service_provider = 'sysv',
|
||||
$galera_master_name = 'mgmt001',
|
||||
$galera_internal_ips = ['127.0.0.1'],
|
||||
$galera_gcache = '1G',
|
||||
$keystone_db_host = '127.0.0.1',
|
||||
$keystone_db_user = 'keystone',
|
||||
$keystone_db_password = 'keystonepassword',
|
||||
|
@ -32,6 +32,7 @@ describe 'cloud::database::sql' do
|
||||
:api_eth => '10.0.0.1',
|
||||
:galera_master_name => 'os-ci-test1',
|
||||
:galera_internal_ips => ['10.0.0.1','10.0.0.2','10.0.0.3'],
|
||||
:galera_gcache => '1G',
|
||||
:keystone_db_host => '10.0.0.1',
|
||||
:keystone_db_user => 'keystone',
|
||||
:keystone_db_password => 'secrete',
|
||||
@ -88,8 +89,8 @@ describe 'cloud::database::sql' do
|
||||
context 'configure mysqlchk http replication' do
|
||||
it { should contain_file('/etc/xinetd.d/mysqlchk').with_mode('0755') }
|
||||
it { should contain_file('/usr/bin/clustercheck').with_mode('0755') }
|
||||
it { should contain_file('/usr/bin/clustercheck').with_content(/MYSQL_USERNAME="#{params[:galera_clustercheck_dbuser]}"/)}
|
||||
it { should contain_file('/usr/bin/clustercheck').with_content(/MYSQL_PASSWORD="#{params[:galera_clustercheck_dbpassword]}"/)}
|
||||
it { should contain_file('/usr/bin/clustercheck').with_content(/MYSQL_USERNAME='#{params[:galera_clustercheck_dbuser]}'/)}
|
||||
it { should contain_file('/usr/bin/clustercheck').with_content(/MYSQL_PASSWORD='#{params[:galera_clustercheck_dbpassword]}'/)}
|
||||
it { should contain_file('/etc/xinetd.d/mysqlchk').with_content(/bind = #{params[:galera_clustercheck_ipaddress]}/)}
|
||||
|
||||
end # configure mysqlchk http replication
|
||||
|
@ -49,14 +49,16 @@ wsrep_provider = "<%= @wsrep_provider %>"
|
||||
wsrep_cluster_name = "galera_cluster"
|
||||
wsrep_cluster_address = "gcomm://<%= @gcomm_definition %>"
|
||||
wsrep_sst_auth = root:<%= @mysql_root_password %>
|
||||
wsrep_certify_nonPK = 1
|
||||
wsrep_convert_LOCK_to_trx = 0
|
||||
wsrep_auto_increment_control = 1
|
||||
wsrep_drupal_282555_workaround = 0
|
||||
wsrep_causal_reads = 0
|
||||
wsrep_sst_method = rsync
|
||||
wsrep_node_address = "<%= @api_eth %>"
|
||||
wsrep_node_incoming_address = "<%= @api_eth %>"
|
||||
# This is the minimal value (proc*2)
|
||||
wsrep_slave_threads = "<%= @processorcount.to_i * 2 %>"
|
||||
|
||||
# Thoses TWEAK assume that the galera cluster is used in master/slave mode
|
||||
wsrep_provider_options = "gcache.size=<%= @galera_gcache %>;gcs.fc_master_slave=1;gcs.fc_limit=256;gcs.fc_factor=0.9"
|
||||
|
||||
# this value here are used by /usr/bin/innobackupex
|
||||
# and wsrep_sst_xtrabackup take only one configuration file and use the last one
|
||||
# (/etc/mysql/my.cnf is not used)
|
||||
|
Loading…
x
Reference in New Issue
Block a user