summaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/nova/api.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/base/nova/api.pp')
-rw-r--r--manifests/profile/base/nova/api.pp26
1 files changed, 17 insertions, 9 deletions
diff --git a/manifests/profile/base/nova/api.pp b/manifests/profile/base/nova/api.pp
index 4064b1e..285e0b7 100644
--- a/manifests/profile/base/nova/api.pp
+++ b/manifests/profile/base/nova/api.pp
@@ -16,28 +16,30 @@
#
# Nova API profile for tripleo
#
-# === Parameters
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
-# [*sync_db*]
-# (Optional) Whether to run db sync
-# Defaults to true
-#
class tripleo::profile::base::nova::api (
- $step = hiera('step'),
- $sync_db = true,
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
+ $step = hiera('step'),
) {
+ if $::hostname == downcase($bootstrap_node) {
+ $sync_db = true
+ } else {
+ $sync_db = false
+ }
include ::tripleo::profile::base::nova
- if $step >= 2 and $sync_db {
+ if $step >= 3 and $sync_db {
include ::nova::db::mysql
include ::nova::db::mysql_api
- Exec<| title == 'galera-ready'|> -> Anchor['nova::db::begin']
}
if $step >= 4 or ($step >= 3 and $sync_db) {
@@ -47,5 +49,11 @@ class tripleo::profile::base::nova::api (
}
include ::nova::network::neutron
}
+
+ if $step >= 5 {
+ if hiera('nova_enable_db_purge', true) {
+ include ::nova::cron::archive_deleted_rows
+ }
+ }
}