Merge "Avoid reproducable mysqld crashes with signal 11"
This commit is contained in:
commit
0a7b366c92
@ -30,7 +30,13 @@ $custom_setup_class = hiera('mysql_custom_setup_class', 'galera')
|
||||
|
||||
# Get galera gcache factor based on cluster node's count
|
||||
$galera_gcache_factor = count(keys($network_metadata['nodes']))
|
||||
$galera_binary_logs = hiera('galera_binary_logs', false)
|
||||
# FIXME(dbilunov): enable binary logs to avoid mysqld crashes (LP#1541338).
|
||||
# Revert this option to false after the upstream bug is resolved.
|
||||
# https://github.com/codership/mysql-wsrep/issues/112
|
||||
$mysql_binary_logs = hiera('mysql_binary_logs', true)
|
||||
$log_bin = pick($mysql_hash['log_bin'], 'mysql-bin')
|
||||
$expire_logs_days = pick($mysql_hash['expire_logs_days'], '1')
|
||||
$max_binlog_size = pick($mysql_hash['max_binlog_size'], '64M')
|
||||
|
||||
$status_user = 'clustercheck'
|
||||
$status_password = $mysql_hash['wsrep_password']
|
||||
@ -151,12 +157,12 @@ if $enabled {
|
||||
}
|
||||
|
||||
# this is configurable via hiera
|
||||
if $galera_binary_logs {
|
||||
if $mysql_binary_logs {
|
||||
$binary_logs_options = {
|
||||
'mysqld' => {
|
||||
'log_bin' => 'mysql-bin',
|
||||
'expire_logs_days' => '1',
|
||||
'max_binlog_size' => '512M',
|
||||
'log_bin' => $log_bin,
|
||||
'expire_logs_days' => $expire_logs_days,
|
||||
'max_binlog_size' => $max_binlog_size,
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -166,9 +172,8 @@ if $enabled {
|
||||
'port' => $backend_port,
|
||||
'max_connections' => $max_connections,
|
||||
'pid-file' => undef,
|
||||
'log_bin' => undef,
|
||||
'expire_logs_days' => undef,
|
||||
'max_binlog_size' => undef,
|
||||
'log_bin' => undef,
|
||||
'collation-server' => 'utf8_general_ci',
|
||||
'init-connect' => 'SET NAMES utf8',
|
||||
'character-set-server' => 'utf8',
|
||||
|
@ -35,6 +35,10 @@ describe manifest do
|
||||
access_networks = ['240.0.0.0/255.255.0.0'] + other_networks.split(' ')
|
||||
end
|
||||
|
||||
let(:mysql_hash) do
|
||||
Noop.hiera 'mysql', {}
|
||||
end
|
||||
|
||||
let(:database_nodes) do
|
||||
Noop.hiera('database_nodes')
|
||||
end
|
||||
@ -47,6 +51,22 @@ describe manifest do
|
||||
(Noop.puppet_function 'get_node_to_ipaddr_map_by_network_role', database_nodes, 'mgmt/database').values
|
||||
end
|
||||
|
||||
let(:mysql_binary_logs) do
|
||||
Noop.hiera 'mysql_binary_logs', true
|
||||
end
|
||||
|
||||
let(:log_bin) do
|
||||
Noop.puppet_function 'pick', mysql_hash['log_bin'], 'mysql-bin'
|
||||
end
|
||||
|
||||
let(:expire_logs_days) do
|
||||
Noop.puppet_function 'pick', mysql_hash['expire_logs_days'], '1'
|
||||
end
|
||||
|
||||
let(:max_binlog_size) do
|
||||
Noop.puppet_function 'pick', mysql_hash['max_binlog_size'], '64M'
|
||||
end
|
||||
|
||||
let(:primary_controller) do
|
||||
Noop.hiera('primary_controller')
|
||||
end
|
||||
@ -192,9 +212,15 @@ describe manifest do
|
||||
)
|
||||
end
|
||||
|
||||
it 'should exclude mysql binary logging by default' do
|
||||
expect(subject).to contain_class('galera').without_override_options(
|
||||
/"logbin"=>"mysql-bin"/
|
||||
it 'should configure mysql binary logging by default' do
|
||||
expect(subject).to contain_class('galera').with_override_options(
|
||||
/"log_bin"=>"mysql-bin"/
|
||||
)
|
||||
expect(subject).to contain_class('galera').with_override_options(
|
||||
/"expire_logs_days"=>"#{expire_logs_days}"/
|
||||
)
|
||||
expect(subject).to contain_class('galera').with_override_options(
|
||||
/"max_binlog_size"=>"#{max_binlog_size}"/
|
||||
)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user