Skip to content

Commit ce43899

Browse files
committed
(MODULES-1804) Allow override of log-error
The mysqld log-error setting may be passed by override_options, but server/service.pp was not using the overridden value. This fixes that.
1 parent 037d30d commit ce43899

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

manifests/server/service.pp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#
22
class mysql::server::service {
3+
$options = $mysql::server::options
34

45
if $mysql::server::real_service_manage {
56
if $mysql::server::real_service_enabled {
@@ -9,7 +10,7 @@
910
}
1011
}
1112

12-
file { $mysql::params::log_error:
13+
file { $options['mysqld']['log-error']:
1314
ensure => present,
1415
owner => 'mysql',
1516
group => 'mysql',

spec/classes/mysql_server_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
})
4646
end
4747
end
48+
context 'with log-error overridden' do
49+
let(:params) {{ :override_options => { 'mysqld' => { 'log-error' => '/tmp/error.log' }} }}
50+
it { is_expected.to contain_file('/tmp/error.log') }
51+
end
4852
end
4953

5054
context 'mysql::server::root_password' do

0 commit comments

Comments
 (0)