From 391abe753f9cfa869706741e8d57ab76b03cde05 Mon Sep 17 00:00:00 2001 From: Francois Deppierraz Date: Thu, 25 Apr 2013 23:46:34 +0200 Subject: [PATCH 1/2] Fix default-storage-engine default value Without this commit, puppetlabs-mysql breaks mysql configuration by inserting a dummy default-storage-engine directive. This will prevent mysql daemon from starting up. For example: notice: /Stage[main]/Mysql::Config/File[/etc/mysql/my.cnf]/content: --- /etc/mysql/my.cnf 2013-04-25 21:36:25.000000000 +0000 +++ /tmp/puppet-file20130425-12937-10tcf50-0 2013-04-25 21:42:49.000000000 +0000 @@ -29,6 +29,8 @@ expire_logs_days = 10 max_binlog_size = 100M +default-storage-engine = undef + [mysqldump] --- manifests/params.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/params.pp b/manifests/params.pp index bc02524..fe3d19b 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -14,7 +14,7 @@ class mysql::params { $bind_address = '127.0.0.1' $config_template = 'mysql/my.cnf.erb' - $default_engine = undef + $default_engine = 'UNSET' $etc_root_password = false $manage_service = true $old_root_password = '' From a555848e7d11429825b7a1031bb9f74af3868497 Mon Sep 17 00:00:00 2001 From: Francois Deppierraz Date: Fri, 26 Apr 2013 00:30:09 +0200 Subject: [PATCH 2/2] Test to avoid broken default-storage-engine settings --- spec/classes/mysql_config_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/classes/mysql_config_spec.rb b/spec/classes/mysql_config_spec.rb index 16f97c4..5f739bc 100644 --- a/spec/classes/mysql_config_spec.rb +++ b/spec/classes/mysql_config_spec.rb @@ -163,6 +163,8 @@ describe 'mysql::config' do ] if param_values[:default_engine] != 'UNSET' expected_lines = expected_lines | [ "default-storage-engine = #{param_values[:default_engine]}" ] + else + content.should_not match(/^default-storage-engine = /) end if param_values[:ssl] expected_lines = expected_lines |