From 7098dfe0b00e2ceb7f5e1d5aae8985215a41ce39 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Fri, 8 Aug 2014 18:00:49 +0200 Subject: [PATCH] database/sql: run bootstrap-mysql before mysql start Replace notify by before to ensure that we bootstrap mysql database before trying to run mysql. Signed-off-by: Emilien Macchi --- manifests/database/sql.pp | 2 +- spec/classes/cloud_database_sql_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/database/sql.pp b/manifests/database/sql.pp index bfb2618d..30c438ad 100644 --- a/manifests/database/sql.pp +++ b/manifests/database/sql.pp @@ -192,7 +192,7 @@ class cloud::database::sql ( exec { 'bootstrap-mysql': command => '/usr/bin/mysql_install_db --rpm --user=mysql', unless => 'test -d /var/lib/mysql/mysql', - notify => Service['mysqld'], + before => Service['mysqld'], require => [Package['mysql-server'], File[$mysql_server_config_file]] } diff --git a/spec/classes/cloud_database_sql_spec.rb b/spec/classes/cloud_database_sql_spec.rb index 4d66ffaf..7b095a0f 100644 --- a/spec/classes/cloud_database_sql_spec.rb +++ b/spec/classes/cloud_database_sql_spec.rb @@ -208,7 +208,7 @@ describe 'cloud::database::sql' do should contain_exec('bootstrap-mysql').with( :command => '/usr/bin/mysql_install_db --rpm --user=mysql', :unless => "test -d /var/lib/mysql/mysql", - :notify => 'Service[mysqld]' + :before => 'Service[mysqld]' ) end end