summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Brewer <dbrewer@dbrewer-host.usersys.redhat.com>2008-04-11 16:41:35 -0400
committerBrenton Leanhardt <bleanhar@redhat.com>2008-04-15 10:37:38 -0400
commitf70e330a8cc7836c93b81fe194d67f0790178789 (patch)
treee332508466d93b8f92233e7c4e1a366d4e0763dc
parentebb42d400c91f5f6f0806a9999a3edb3f69b1c5e (diff)
downloadpuppet-mysql-f70e330a8cc7836c93b81fe194d67f0790178789.tar.gz
puppet-mysql-f70e330a8cc7836c93b81fe194d67f0790178789.tar.xz
puppet-mysql-f70e330a8cc7836c93b81fe194d67f0790178789.zip
added clause to remove set_master script if slave not started
-rw-r--r--manifests/init.pp6
1 files changed, 6 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 788fd60..d202785 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -131,6 +131,12 @@ define mysql::mysql_replication{
require => Exec["grants all to replication user"],
}
+ exec { "remove set master datafile":
+ command => "rm /var/lib/mysql/set_master_repl_data.sql",
+ unless => "$mysql_cmd_repl_with_pwd --execute=\"show slave status;\" | grep Wait",
+ require => File["/var/lib/mysql/gather_master_data.bash"],
+ }
+
exec { "set master data for slave":
command => "/var/lib/mysql/gather_master_data.bash",
creates => "/var/lib/mysql/set_master_repl_data.sql",