Merge "Only db-sync sahara is included in the bootstrapnode"

This commit is contained in:
Jenkins 2016-08-09 18:12:12 +00:00 committed by Gerrit Code Review
commit 9968f0b954
3 changed files with 20 additions and 5 deletions

View File

@ -18,14 +18,27 @@
# #
# === Parameters # === Parameters
# #
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('bootstrap_nodeid')
#
# [*step*] # [*step*]
# (Optional) The current step of the deployment # (Optional) The current step of the deployment
# Defaults to hiera('step') # Defaults to hiera('step')
# #
class tripleo::profile::base::sahara ( class tripleo::profile::base::sahara (
$step = hiera('step'), $bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = hiera('step'),
) { ) {
if $step >= 4 { if $::hostname == downcase($bootstrap_node) {
include ::sahara $sync_db = true
} else {
$sync_db = false
}
if $step >= 4 or ($step >= 3 and $sync_db){
class { '::sahara':
sync_db => $sync_db,
}
} }
} }

View File

@ -26,8 +26,9 @@
class tripleo::profile::base::sahara::api ( class tripleo::profile::base::sahara::api (
$step = hiera('step'), $step = hiera('step'),
) { ) {
include ::tripleo::profile::base::sahara
if $step >= 4 { if $step >= 4 {
include ::tripleo::profile::base::sahara
include ::sahara::service::api include ::sahara::service::api
} }
} }

View File

@ -37,12 +37,13 @@ class tripleo::profile::base::sahara::engine (
$sync_db = false $sync_db = false
} }
include ::tripleo::profile::base::sahara
if $step >= 3 and $sync_db { if $step >= 3 and $sync_db {
include ::sahara::db::mysql include ::sahara::db::mysql
} }
if $step >= 4 or ($step >= 3 and $sync_db) { if $step >= 4 or ($step >= 3 and $sync_db) {
include ::tripleo::profile::base::sahara
include ::sahara::service::engine include ::sahara::service::engine
} }
} }