diff --git a/deployment/puppet/galera/manifests/init.pp b/deployment/puppet/galera/manifests/init.pp index 6f466bea13..b7a5eadfc9 100644 --- a/deployment/puppet/galera/manifests/init.pp +++ b/deployment/puppet/galera/manifests/init.pp @@ -258,9 +258,11 @@ class galera ( # This exec waits for initial sync of galera cluster after mysql replication user creation. + + $user_password_string="-u${mysql_user} -p${mysql_password}" exec { "wait-initial-sync": logoutput => true, - command => "/usr/bin/mysql -Nbe \"show status like 'wsrep_local_state_comment'\" | /bin/grep -q -e Synced -e Initialized && sleep 10", + command => "/usr/bin/mysql ${user_password_string} -Nbe \"show status like 'wsrep_local_state_comment'\" | /bin/grep -q -e Synced -e Initialized && sleep 10", try_sleep => 5, tries => 60, refreshonly => true, @@ -272,7 +274,7 @@ class galera ( exec { "wait-for-synced-state": logoutput => true, - command => "/usr/bin/mysql -Nbe \"show status like 'wsrep_local_state_comment'\" | /bin/grep -q Synced && sleep 10", + command => "/usr/bin/mysql ${user_password_string} -Nbe \"show status like 'wsrep_local_state_comment'\" | /bin/grep -q Synced && sleep 10", try_sleep => 5, tries => 60, } diff --git a/deployment/puppet/mysql/manifests/password.pp b/deployment/puppet/mysql/manifests/password.pp index 3b47fb6060..29339d972b 100644 --- a/deployment/puppet/mysql/manifests/password.pp +++ b/deployment/puppet/mysql/manifests/password.pp @@ -37,9 +37,9 @@ class mysql::password ( Exec['set_mysql_rootpw'] -> File['mysql_password'] File <| title == $config_file |> -> File['mysql_password'] File <| title == '/etc/my.cnf' |> -> File['mysql_password'] - File['mysql_password'] -> Database <||> - File['mysql_password'] -> Database_grant <||> - File['mysql_password'] -> Database_user <||> + File['mysql_password'] -> Database <| provider=='mysql' |> + File['mysql_password'] -> Database_grant <| provider=='mysql' |> + File['mysql_password'] -> Database_user <| provider=='mysql' |> if defined(Class['galera']) { Class['galera'] -> Class['mysql::password'] @@ -47,4 +47,4 @@ class mysql::password ( } -} \ No newline at end of file +}