summaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
authorEmilien Macchi <emilien@redhat.com>2016-06-10 11:28:39 -0400
committerEmilien Macchi <emilien@redhat.com>2016-07-27 19:33:53 +0000
commit0ef28cef1f1d97b89ad45c878c0c523c44a32f45 (patch)
treee011789fe90bef7213566a86e9448ebef8637b45 /manifests
parente32a36ae326a673d62a0a60fea6c36ba5ad1d184 (diff)
profile/base/nova: declare nova class and configure cache correctly.
Nova {} workaround is not working correctly, we need to merge this patch so we can move out ::nova from THT completely. Also we need to use nova::cache to configure memcached parameters. Co-Authorized-By: Giulio Fidente <gfidente@redhat.com> Co-Authorized-By: Sven Anderson <sven@redhat.com> Co-Authorized-By: Emilien Macchi <emilien@redhat.com> Depends-On: I52d5badb9960124bb8fcb54983db2853c4185e77 Depends-On: I3e400a5f64b85f0d374fc02cc5e4080d19d0f2e4 Depends-On: Iee5f8015cbf40ca0e9a435a7de919ebdb74cf93f Change-Id: Ie4e72e765f6a8ade48d4b2b766f067872554d1a2
Diffstat (limited to 'manifests')
-rw-r--r--manifests/profile/base/nova.pp28
-rw-r--r--manifests/profile/pacemaker/nova.pp9
2 files changed, 27 insertions, 10 deletions
diff --git a/manifests/profile/base/nova.pp b/manifests/profile/base/nova.pp
index 52a4c73..877184d 100644
--- a/manifests/profile/base/nova.pp
+++ b/manifests/profile/base/nova.pp
@@ -18,6 +18,10 @@
#
# === Parameters
#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
# [*step*]
# (Optional) The current step of the deployment
# Defaults to hiera('step')
@@ -35,26 +39,32 @@
# Defaults to false
#
class tripleo::profile::base::nova (
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = hiera('step'),
$manage_migration = false,
$libvirt_enabled = false,
$nova_compute_enabled = false,
) {
+ 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('memcache_node_ips_v6'), ':11211')
} else {
- $memcached_servers = suffix(hiera('memcache_node_ips'), ':11211')
+ $memcache_servers = suffix(hiera('memcache_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 {
diff --git a/manifests/profile/pacemaker/nova.pp b/manifests/profile/pacemaker/nova.pp
index 13c6128..62a8042 100644
--- a/manifests/profile/pacemaker/nova.pp
+++ b/manifests/profile/pacemaker/nova.pp
@@ -26,6 +26,13 @@ class tripleo::profile::pacemaker::nova (
$step = hiera('step'),
) {
- include ::tripleo::profile::base::nova
+ Service <|
+ tag == 'nova-service'
+ |> {
+ hasrestart => true,
+ restart => '/bin/true',
+ start => '/bin/true',
+ stop => '/bin/true',
+ }
}