You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 11, 2019. It is now read-only.
When specifying '%' as the mysql_host, Puppet runs error out with the following -
Notice: /Stage[main]//Mysql::Grant[db1]/Mysql::Queryfile[mysql_db_init_query_file-%-db1]/Exec[mysqlqueryfile-mysql_db_init_query_file-%-db1]/returns: ERROR 2005 (HY000): Unknown MySQL server host '%' (0)
Error: mysql -u alpha --password="alpha" -h % db1 < /tmp/db1_init.sql && touch /root/puppet-mysql/mysqlqueryfile-mysql_db_init_query_file-%-db1.run returned 1 instead of one of [0]
Error: /Stage[main]//Mysql::Grant[db1]/Mysql::Queryfile[mysql_db_init_query_file-%-db1]/Exec[mysqlqueryfile-mysql_db_init_query_file-%-db1]/returns: change from notrun to 0 failed: mysql -u alpha --password="alpha" -h % db1 < /tmp/db1_init.sql && touch /root/puppet-mysql/mysqlqueryfile-mysql_db_init_query_file-%-db1.run returned 1 instead of one of [0]
I was able to work around this by making the following edits -
When specifying '%' as the mysql_host, Puppet runs error out with the following -
Notice: /Stage[main]//Mysql::Grant[db1]/Mysql::Queryfile[mysql_db_init_query_file-%-db1]/Exec[mysqlqueryfile-mysql_db_init_query_file-%-db1]/returns: ERROR 2005 (HY000): Unknown MySQL server host '%' (0)
Error: mysql -u alpha --password="alpha" -h % db1 < /tmp/db1_init.sql && touch /root/puppet-mysql/mysqlqueryfile-mysql_db_init_query_file-%-db1.run returned 1 instead of one of [0]
Error: /Stage[main]//Mysql::Grant[db1]/Mysql::Queryfile[mysql_db_init_query_file-%-db1]/Exec[mysqlqueryfile-mysql_db_init_query_file-%-db1]/returns: change from notrun to 0 failed: mysql -u alpha --password="alpha" -h % db1 < /tmp/db1_init.sql && touch /root/puppet-mysql/mysqlqueryfile-mysql_db_init_query_file-%-db1.run returned 1 instead of one of [0]
I was able to work around this by making the following edits -
diff --git a/manifests/grant.pp b/manifests/grant.pp
index ce7ce2f..d286cc3 100644
--- a/manifests/grant.pp
+++ b/manifests/grant.pp
@@ -130,6 +130,7 @@ define mysql::grant (
mysql_password => $mysql_password,
mysql_db => $mysql_db,
mysql_host => $mysql_host,
}
}
diff --git a/manifests/queryfile.pp b/manifests/queryfile.pp
index 01c585c..e42acad 100644
--- a/manifests/queryfile.pp
+++ b/manifests/queryfile.pp
@@ -7,6 +7,7 @@ define mysql::queryfile (
$mysql_password = '',
$mysql_host = '',
$mysql_query_filepath = '/root/puppet-mysql'
) {
if ! defined(File[$mysql_query_filepath]) {
@@ -20,9 +21,9 @@ define mysql::queryfile (
default => "-u ${mysql_user}",
}
'' => '',
}
$arg_mysql_password = $mysql_password ? {
Not sure if this is a bug though, or just an edge case I've found?
The text was updated successfully, but these errors were encountered: