Parameterized pidfile; critical for successful first restart
This commit is contained in:
parent
3084f8c44c
commit
6869b77541
5 changed files with 10 additions and 0 deletions
|
@ -38,6 +38,7 @@ class mysql::config(
|
|||
$service_name = $mysql::params::service_name,
|
||||
$config_file = $mysql::params::config_file,
|
||||
$socket = $mysql::params::socket,
|
||||
$pidfile = $mysql::params::pidfile,
|
||||
$datadir = $mysql::params::datadir,
|
||||
$ssl = $mysql::params::ssl,
|
||||
$ssl_ca = $mysql::params::ssl_ca,
|
||||
|
|
|
@ -34,6 +34,7 @@ class mysql::params {
|
|||
$client_package_name = 'mysql'
|
||||
$server_package_name = 'mysql-server'
|
||||
$socket = '/var/lib/mysql/mysql.sock'
|
||||
$pidfile = '/var/run/mysqld/mysqld.pid'
|
||||
$config_file = '/etc/my.cnf'
|
||||
$log_error = '/var/log/mysqld.log'
|
||||
$ruby_package_name = 'ruby-mysql'
|
||||
|
@ -53,6 +54,7 @@ class mysql::params {
|
|||
$client_package_name = 'mysql-client'
|
||||
$server_package_name = 'mysql-server'
|
||||
$socket = '/var/run/mysqld/mysqld.sock'
|
||||
$pidfile = '/var/run/mysqld/mysqld.pid'
|
||||
$config_file = '/etc/mysql/my.cnf'
|
||||
$log_error = '/var/log/mysql/error.log'
|
||||
$ruby_package_name = 'libmysql-ruby'
|
||||
|
@ -71,6 +73,7 @@ class mysql::params {
|
|||
$client_package_name = 'databases/mysql55-client'
|
||||
$server_package_name = 'databases/mysql55-server'
|
||||
$socket = '/tmp/mysql.sock'
|
||||
$pidfile = '/var/db/mysql/mysql.pid'
|
||||
$config_file = '/var/db/mysql/my.cnf'
|
||||
$log_error = "/var/db/mysql/${::hostname}.err"
|
||||
$ruby_package_name = 'ruby-mysql'
|
||||
|
|
|
@ -21,6 +21,7 @@ describe 'mysql::config' do
|
|||
: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',
|
||||
|
@ -31,6 +32,7 @@ describe 'mysql::config' do
|
|||
: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' => {
|
||||
|
@ -38,6 +40,7 @@ describe 'mysql::config' do
|
|||
: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',
|
||||
|
@ -92,6 +95,7 @@ describe 'mysql::config' do
|
|||
:service_name => 'dans_service',
|
||||
:config_file => '/home/dan/mysql.conf',
|
||||
:service_name => 'dans_mysql',
|
||||
:pidfile => '/home/dan/mysql.pid',
|
||||
:socket => '/home/dan/mysql.sock',
|
||||
:bind_address => '0.0.0.0',
|
||||
:port => '3306',
|
||||
|
@ -153,6 +157,7 @@ describe 'mysql::config' do
|
|||
expected_lines = [
|
||||
"port = #{param_values[:port]}",
|
||||
"socket = #{param_values[:socket]}",
|
||||
"pid-file = #{param_values[:pidfile]}",
|
||||
"datadir = #{param_values[:datadir]}",
|
||||
"bind-address = #{param_values[:bind_address]}"
|
||||
]
|
||||
|
|
0
spec/fixtures/manifests/site.pp
vendored
0
spec/fixtures/manifests/site.pp
vendored
|
@ -6,6 +6,7 @@ socket = <%= socket %>
|
|||
nice = 0
|
||||
[mysqld]
|
||||
user = mysql
|
||||
pid-file = <%= pidfile %>
|
||||
socket = <%= socket %>
|
||||
port = <%= port %>
|
||||
basedir = <%= basedir %>
|
||||
|
|
Loading…
Reference in a new issue