Use clustercheck credentials to poll galera state in container

The clustercheck service currently connects to mysql as root
to poll the state of the galera cluster.

Update the generated config to use clustercheck credentials.

Depends-On: If8e0b3f9e4f317fde5328e71115aab87a5fa655f
Closes-Bug: #1707683

Change-Id: I4ee6e1f56a7880ccf456f5c08d26a267fb810361
This commit is contained in:
Damien Ciabrini 2017-07-31 09:10:47 -04:00
parent 01ae503525
commit 5caebe85e9
1 changed files with 8 additions and 3 deletions

View File

@ -26,14 +26,19 @@
# (Optional) The address that the local mysql instance should bind to.
# Defaults to hiera('mysql_bind_host')
#
# [*clustercheck_user*]
# (Optional) The name of the clustercheck user.
# Defaults to 'clustercheck'
#
# [*clustercheck_password*]
# (Optional) The password for the clustercheck user.
# Defaults to hiera('mysql::server::root_password')
# Defaults to hiera('mysql_clustercheck_password')
#
#
class tripleo::profile::pacemaker::clustercheck (
$step = Integer(hiera('step')),
$clustercheck_password = hiera('mysql::server::root_password'),
$clustercheck_user = 'clustercheck',
$clustercheck_password = hiera('mysql_clustercheck_password'),
$bind_address = hiera('mysql_bind_host'),
) {
@ -43,7 +48,7 @@ class tripleo::profile::pacemaker::clustercheck (
mode => '0600',
owner => 'mysql',
group => 'mysql',
content => "MYSQL_USERNAME=root\n
content => "MYSQL_USERNAME=${clustercheck_user}\n
MYSQL_PASSWORD='${clustercheck_password}'\n
MYSQL_HOST=localhost\n",
}