summaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/nova.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/base/nova.pp')
-rw-r--r--manifests/profile/base/nova.pp46
1 files changed, 28 insertions, 18 deletions
diff --git a/manifests/profile/base/nova.pp b/manifests/profile/base/nova.pp
index 52a4c73..b43b8e8 100644
--- a/manifests/profile/base/nova.pp
+++ b/manifests/profile/base/nova.pp
@@ -18,43 +18,53 @@
#
# === Parameters
#
-# [*step*]
-# (Optional) The current step of the deployment
-# Defaults to hiera('step')
-#
-# [*manage_migration*]
-# (Optional) Whether or not manage Nova Live migration
-# Defaults to false
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
#
# [*libvirt_enabled*]
# (Optional) Whether or not Libvirt is enabled.
# Defaults to false
#
+# [*manage_migration*]
+# (Optional) Whether or not manage Nova Live migration
+# Defaults to false
+#
# [*nova_compute_enabled*]
# (Optional) Whether or not nova-compute is enabled.
# Defaults to false
#
+# [*step*]
+# (Optional) The current step of the deployment
+# Defaults to hiera('step')
+#
class tripleo::profile::base::nova (
- $step = hiera('step'),
- $manage_migration = false,
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
$libvirt_enabled = false,
+ $manage_migration = false,
$nova_compute_enabled = false,
+ $step = hiera('step'),
) {
+ if $::hostname == downcase($bootstrap_node) {
+ $sync_db = true
+ } else {
+ $sync_db = false
+ }
if hiera('nova::use_ipv6', false) {
- $memcached_servers = suffix(hiera('memcache_node_ips_v6'), ':11211')
+ $memcache_servers = suffix(hiera('memcached_node_ips_v6'), ':11211')
} else {
- $memcached_servers = suffix(hiera('memcache_node_ips'), ':11211')
+ $memcache_servers = suffix(hiera('memcached_node_ips'), ':11211')
}
- if $step >= 3 {
+
+ if hiera('step') >= 4 or (hiera('step') >= 3 and $sync_db) {
include ::nova
- # TODO(emilien): once we merge https://review.openstack.org/#/c/325983/
- # let's override the value this way.
- warning('Overriding memcached_servers from puppet-tripleo until 325983 lands.')
- Nova {
- memcached_servers => $memcached_servers,
- }
include ::nova::config
+ class { '::nova::cache':
+ enabled => true,
+ backend => 'oslo_cache.memcache_pool',
+ memcache_servers => $memcache_servers,
+ }
}
if $step >= 4 {