From 3ff41fd1c06fa998ab8d73708f8ee63598f7d1bf Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 6 Aug 2014 14:49:59 +0200 Subject: [PATCH 1/2] database/sql: fix clean-mysql-binlog notify In 2.2 release of puppetlabs-mysql, we have to notify the service mysqld itself instead of using an old exec. --- manifests/database/sql.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/database/sql.pp b/manifests/database/sql.pp index 96c56ceb..7fbd81e9 100644 --- a/manifests/database/sql.pp +++ b/manifests/database/sql.pp @@ -295,7 +295,7 @@ class cloud::database::sql ( File['/root/.my.cnf'], Service['mysqld'], ], - notify => Exec['mysqld-restart'], + notify => Service['mysqld'], refreshonly => true, onlyif => "stat ${::mysql::params::datadir}/ib_logfile0 && test `du -sh ${::mysql::params::datadir}/ib_logfile0 | cut -f1` != '256M'", } From 697861358c29df28028df9e2671f724e18bea8da Mon Sep 17 00:00:00 2001 From: Sebastien Badia Date: Wed, 6 Aug 2014 15:11:49 +0200 Subject: [PATCH 2/2] database/sql: fix clean-mysql-binlog notify table, user and privilegs args of mysql_grant are required arguments in 2.2 release of puppetlabs-mysql. This commit remove alos the require on my.cnf and mysqld (this cause a cycle dependency) --- manifests/database/sql.pp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/manifests/database/sql.pp b/manifests/database/sql.pp index 7fbd81e9..d2658452 100644 --- a/manifests/database/sql.pp +++ b/manifests/database/sql.pp @@ -247,7 +247,11 @@ class cloud::database::sql ( require => File['/root/.my.cnf'] } mysql_grant { "${galera_clustercheck_dbuser}@localhost/monitoring": - privileges => ['ALL'] + ensure => 'present', + options => ['GRANT'], + privileges => ['ALL'], + table => 'monitoring.*', + user => "${galera_clustercheck_dbuser}@localhost", } Database_user<<| |>> @@ -291,10 +295,6 @@ class cloud::database::sql ( # first sync take a long time command => "/bin/bash -c '/usr/bin/mysqladmin --defaults-file=/root/.my.cnf shutdown ; /bin/rm ${::mysql::params::datadir}/ib_logfile*'", path => '/usr/bin', - require => [ - File['/root/.my.cnf'], - Service['mysqld'], - ], notify => Service['mysqld'], refreshonly => true, onlyif => "stat ${::mysql::params::datadir}/ib_logfile0 && test `du -sh ${::mysql::params::datadir}/ib_logfile0 | cut -f1` != '256M'",