From 67b88d038177a1123efbb8dcf98735ac6cb94953 Mon Sep 17 00:00:00 2001 From: desalvo Date: Thu, 30 Jan 2014 17:50:35 +0100 Subject: [PATCH] Fixed mysql db initialization when using a custom datadir location --- Modulefile | 2 +- README.md | 4 ++++ manifests/init.pp | 2 +- manifests/params.pp | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Modulefile b/Modulefile index e73570c..026c677 100644 --- a/Modulefile +++ b/Modulefile @@ -1,5 +1,5 @@ name 'desalvo-percona' -version '0.1.4' +version '0.1.5' source 'https://github.com/desalvo/puppet-percona' author 'desalvo' license 'Apache License, Version 2.0' diff --git a/README.md b/README.md index a3d9745..bffda77 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,10 @@ Contributors Release Notes ------------- +**0.1.5** + +* Fixed mysql db initialization when using a custom datadir location + **0.1.4** * Better handling of the datadir parameter diff --git a/manifests/init.pp b/manifests/init.pp index 262074c..216ce5b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -175,7 +175,7 @@ exec { "init percona db": command => "mysql_install_db", path => [ '/bin', '/usr/bin' ], - unless => "test -f $percona::params::percona_host_table", + unless => "test -f ${datadir}/${percona::params::percona_host_table}", require => [File[$percona::params::percona_conf],File[$datadir],Package[$percona::params::percona_server_packages]], timeout => 0 } diff --git a/manifests/params.pp b/manifests/params.pp index b292336..eb9e61b 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -4,7 +4,7 @@ 'RedHat': { $percona_conf = '/etc/my.cnf' $galera_provider = '/usr/lib64/libgalera_smm.so' - $percona_host_table = "/var/lib/mysql/mysql/host.frm" + $percona_host_table = "mysql/host.frm" $percona_compat_packages = [ 'Percona-Server-shared-compat', ] @@ -39,7 +39,7 @@ 'Debian': { $percona_conf = '/etc/mysql/my.cnf' $galera_provider = '/usr/lib/libgalera_smm.so' - $percona_host_table = "/var/lib/mysql/mysql/host.frm" + $percona_host_table = "mysql/host.frm" case $mysql_version { '5.6': { $percona_galera_package = 'percona-xtradb-cluster-galera-3.x'