Fix galera helper execs to use replication user
Set galera helper execs to use replication user credentials in order to not mess with root password setup. Change-Id: If18be6f709271c0953b557c628132f53bcec5626 Closes-Bug: #1315396
This commit is contained in:
parent
025c8509e2
commit
63a300f108
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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 (
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue