Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-mysql
Conflicts: manifests/config.pp spec/classes/mysql_config_spec.rb
This commit is contained in:
commit
9d69afcae7
5 changed files with 31 additions and 30 deletions
|
@ -112,7 +112,7 @@ class mysql::config(
|
|||
$query_cache_size = $mysql::query_cache_size,
|
||||
$max_binlog_size = $mysql::max_binlog_size,
|
||||
$expire_logs_days = $mysql::expire_logs_days,
|
||||
$max_connections = 'UNSET',
|
||||
$max_connections = $mysql::max_connections,
|
||||
$tmp_table_size = 'UNSET',
|
||||
$max_heap_table_size = 'UNSET',
|
||||
$table_open_cache = 'UNSET',
|
||||
|
|
|
@ -112,6 +112,7 @@ class mysql(
|
|||
$port = $mysql::params::port,
|
||||
$purge_conf_dir = $mysql::params::purge_conf_dir,
|
||||
$python_package_name = $mysql::params::python_package_name,
|
||||
$max_connections = $mysql::params::max_connections,
|
||||
$restart = $mysql::params::restart,
|
||||
$root_group = $mysql::params::root_group,
|
||||
$root_password = $mysql::params::root_password,
|
||||
|
|
|
@ -20,6 +20,7 @@ class mysql::params {
|
|||
$old_root_password = ''
|
||||
$package_ensure = 'present'
|
||||
$purge_conf_dir = false
|
||||
$max_connections = 151
|
||||
$port = 3306
|
||||
$max_allowed_packet = '16M'
|
||||
$root_password = 'UNSET'
|
||||
|
|
|
@ -5,6 +5,7 @@ describe 'mysql::config' do
|
|||
{
|
||||
:root_password => 'UNSET',
|
||||
:old_root_password => '',
|
||||
:max_connections => '151',
|
||||
:bind_address => '127.0.0.1',
|
||||
:port => '3306',
|
||||
:etc_root_password => false,
|
||||
|
@ -21,7 +22,6 @@ describe 'mysql::config' do
|
|||
:max_binlog_size => '100M',
|
||||
:expire_logs_days => 10,
|
||||
:character_set => 'UNSET',
|
||||
:max_connections => 'UNSET',
|
||||
:tmp_table_size => 'UNSET',
|
||||
:max_heap_table_size => 'UNSET',
|
||||
:table_open_cache => 'UNSET',
|
||||
|
@ -40,34 +40,34 @@ describe 'mysql::config' do
|
|||
describe 'with osfamily specific defaults' do
|
||||
{
|
||||
'Debian' => {
|
||||
:datadir => '/var/lib/mysql',
|
||||
:service_name => 'mysql',
|
||||
:config_file => '/etc/mysql/my.cnf',
|
||||
:socket => '/var/run/mysqld/mysqld.sock',
|
||||
:pidfile => '/var/run/mysqld/mysqld.pid',
|
||||
:root_group => 'root',
|
||||
:ssl_ca => '/etc/mysql/cacert.pem',
|
||||
:ssl_cert => '/etc/mysql/server-cert.pem',
|
||||
:ssl_key => '/etc/mysql/server-key.pem'
|
||||
:datadir => '/var/lib/mysql',
|
||||
:service_name => 'mysql',
|
||||
:config_file => '/etc/mysql/my.cnf',
|
||||
:socket => '/var/run/mysqld/mysqld.sock',
|
||||
:pidfile => '/var/run/mysqld/mysqld.pid',
|
||||
:root_group => 'root',
|
||||
:ssl_ca => '/etc/mysql/cacert.pem',
|
||||
:ssl_cert => '/etc/mysql/server-cert.pem',
|
||||
:ssl_key => '/etc/mysql/server-key.pem'
|
||||
},
|
||||
'FreeBSD' => {
|
||||
:datadir => '/var/db/mysql',
|
||||
:service_name => 'mysql-server',
|
||||
:config_file => '/var/db/mysql/my.cnf',
|
||||
:socket => '/tmp/mysql.sock',
|
||||
:pidfile => '/var/db/mysql/mysql.pid',
|
||||
:root_group => 'wheel'
|
||||
:datadir => '/var/db/mysql',
|
||||
:service_name => 'mysql-server',
|
||||
:config_file => '/var/db/mysql/my.cnf',
|
||||
:socket => '/tmp/mysql.sock',
|
||||
:pidfile => '/var/db/mysql/mysql.pid',
|
||||
:root_group => 'wheel'
|
||||
},
|
||||
'RedHat' => {
|
||||
:datadir => '/var/lib/mysql',
|
||||
:service_name => 'mysqld',
|
||||
:config_file => '/etc/my.cnf',
|
||||
:socket => '/var/lib/mysql/mysql.sock',
|
||||
:pidfile => '/var/run/mysqld/mysqld.pid',
|
||||
:root_group => 'root',
|
||||
:ssl_ca => '/etc/mysql/cacert.pem',
|
||||
:ssl_cert => '/etc/mysql/server-cert.pem',
|
||||
:ssl_key => '/etc/mysql/server-key.pem'
|
||||
:datadir => '/var/lib/mysql',
|
||||
:service_name => 'mysqld',
|
||||
:config_file => '/etc/my.cnf',
|
||||
:socket => '/var/lib/mysql/mysql.sock',
|
||||
:pidfile => '/var/run/mysqld/mysqld.pid',
|
||||
:root_group => 'root',
|
||||
:ssl_ca => '/etc/mysql/cacert.pem',
|
||||
:ssl_cert => '/etc/mysql/server-cert.pem',
|
||||
:ssl_key => '/etc/mysql/server-key.pem'
|
||||
}
|
||||
}.each do |osfamily, osparams|
|
||||
|
||||
|
@ -208,6 +208,7 @@ describe 'mysql::config' do
|
|||
"socket = #{param_values[:socket]}",
|
||||
"pid-file = #{param_values[:pidfile]}",
|
||||
"datadir = #{param_values[:datadir]}",
|
||||
"max_connections = #{param_values[:max_connections]}",
|
||||
"bind-address = #{param_values[:bind_address]}",
|
||||
"key_buffer = #{param_values[:key_buffer]}",
|
||||
"max_allowed_packet = #{param_values[:max_allowed_packet]}",
|
||||
|
@ -219,9 +220,6 @@ describe 'mysql::config' do
|
|||
"expire_logs_days = #{param_values[:expire_logs_days]}",
|
||||
"max_binlog_size = #{param_values[:max_binlog_size]}"
|
||||
]
|
||||
if param_values[:max_connections] != 'UNSET'
|
||||
expected_lines = expected_lines | [ "max_connections = #{param_values[:max_connections]}" ]
|
||||
end
|
||||
if param_values[:tmp_table_size] != 'UNSET'
|
||||
expected_lines = expected_lines | [ "tmp_table_size = #{param_values[:tmp_table_size]}" ]
|
||||
end
|
||||
|
@ -320,7 +318,7 @@ describe 'mysql::config' do
|
|||
|
||||
describe 'unset ssl params should fail when ssl is true on freebsd' do
|
||||
let :facts do
|
||||
{:osfamily => 'FreeBSD'}
|
||||
{:osfamily => 'FreeBSD'}
|
||||
end
|
||||
|
||||
let :params do
|
||||
|
|
|
@ -19,6 +19,7 @@ port = <%= @port %>
|
|||
basedir = <%= @basedir %>
|
||||
datadir = <%= @datadir %>
|
||||
tmpdir = <%= @tmpdir %>
|
||||
max_connections = <%= @max_connections %>
|
||||
skip-external-locking
|
||||
|
||||
<% if @bind_address -%>
|
||||
|
|
Loading…
Reference in a new issue