diff options
author | 2016-10-13 11:21:02 -0400 | |
---|---|---|
committer | 2016-10-13 11:21:02 -0400 | |
commit | 381e59f6e15ab4cb5316e0be3ba831fe61b318d2 (patch) | |
tree | 5e1c3b9d8f25bb17e8b5a28cf4ebb2940482b8a4 /manifests | |
parent | c4e7d4dc52b9351529fac6c4979aad5fa2a4cf1e (diff) |
pacemaker/mysql: wait step 2 to remove default accounts
remove_default_accounts is a mysql::server parameter that, set to True,
will execute some MySQL commands to cleanup MySQL defaults accounts
created by packaging.
In order to successfully run the commands, we need MySQL up and running,
which is not the case at step 1 but at step 2.
This patch make sure we run the commands at step 2 on pacemaker master
only.
No change for scenarios without Pacemaker.
Change-Id: Ifad3cb40fd958d7ea606b9cd2ba4c8ec22a8e94e
Closes-Bug: #1633113
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/profile/pacemaker/database/mysql.pp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/manifests/profile/pacemaker/database/mysql.pp b/manifests/profile/pacemaker/database/mysql.pp index 7464854..a353e5f 100644 --- a/manifests/profile/pacemaker/database/mysql.pp +++ b/manifests/profile/pacemaker/database/mysql.pp @@ -89,9 +89,19 @@ class tripleo::profile::pacemaker::database::mysql ( } } + # remove_default_accounts parameter will execute some mysql commands + # to remove the default accounts created by MySQL package. + # We need MySQL running to run the commands successfully, so better to + # wait step 2 before trying to run the commands. + if $step >= 2 and $pacemaker_master { + $remove_default_accounts = true + } else { + $remove_default_accounts = false + } + class { '::tripleo::profile::base::database::mysql': manage_resources => false, - remove_default_accounts => $pacemaker_master, + remove_default_accounts => $remove_default_accounts, mysql_server_options => $mysqld_options, } |