Closed hundredacres closed 9 years ago
Can you submit your change as pull request via GitHub (here is rather unreadable)
Done.
Thanks.
On Mar 13, 2014, at 1:48 AM, Alessandro Franceschi notifications@github.com wrote:
Can you submit your change as pull request via GitHub (here is rather unreadable)
— Reply to this email directly or view it on GitHub.
Hi @hundredacres,
Thank you for the report. This is now patched.
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,
$remote_host = '', ) {
if ! defined(File[$mysql_query_filepath]) { @@ -20,9 +21,9 @@ define mysql::queryfile ( default => "-u ${mysql_user}", }
default => "-h ${remote_host}", }
$arg_mysql_password = $mysql_password ? {
Not sure if this is a bug though, or just an edge case I've found?