From 381e59f6e15ab4cb5316e0be3ba831fe61b318d2 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Thu, 13 Oct 2016 11:21:02 -0400 Subject: 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 --- manifests/profile/pacemaker/database/mysql.pp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'manifests/profile/pacemaker/database/mysql.pp') 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, } -- cgit 1.2.3-korg