aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/nova
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/base/nova')
-rw-r--r--manifests/profile/base/nova/api.pp23
-rw-r--r--manifests/profile/base/nova/compute.pp14
-rw-r--r--manifests/profile/base/nova/compute/ironic.pp34
-rw-r--r--manifests/profile/base/nova/compute/libvirt.pp1
-rw-r--r--manifests/profile/base/nova/conductor.pp2
-rw-r--r--manifests/profile/base/nova/consoleauth.pp2
-rw-r--r--manifests/profile/base/nova/libvirt.pp1
-rw-r--r--manifests/profile/base/nova/scheduler.pp2
-rw-r--r--manifests/profile/base/nova/vncproxy.pp2
9 files changed, 64 insertions, 17 deletions
diff --git a/manifests/profile/base/nova/api.pp b/manifests/profile/base/nova/api.pp
index 3b36c57..285e0b7 100644
--- a/manifests/profile/base/nova/api.pp
+++ b/manifests/profile/base/nova/api.pp
@@ -16,21 +16,24 @@
#
# 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
@@ -46,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
+ }
+ }
}
diff --git a/manifests/profile/base/nova/compute.pp b/manifests/profile/base/nova/compute.pp
index 16b61df..076996a 100644
--- a/manifests/profile/base/nova/compute.pp
+++ b/manifests/profile/base/nova/compute.pp
@@ -38,9 +38,23 @@ class tripleo::profile::base::nova::compute (
# deploy basic bits for nova-compute
include ::nova::compute
+ # If Service['nova-conductor'] is in catalog, make sure we start it
+ # before nova-compute.
+ Service<| title == 'nova-conductor' |> -> Service['nova-compute']
# deploy bits to connect nova compute to neutron
include ::nova::network::neutron
+
+ # When utilising images for deployment, we need to reset the iSCSI initiator name to make it unique
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1244328
+ exec { 'reset-iscsi-initiator-name':
+ command => '/bin/echo InitiatorName=$(/usr/sbin/iscsi-iname) > /etc/iscsi/initiatorname.iscsi',
+ onlyif => '/usr/bin/test ! -f /etc/iscsi/.initiator_reset',
+ before => File['/etc/iscsi/.initiator_reset'],
+ }
+ file { '/etc/iscsi/.initiator_reset':
+ ensure => present,
+ }
}
# If NFS is used as a Cinder backend
diff --git a/manifests/profile/base/nova/compute/ironic.pp b/manifests/profile/base/nova/compute/ironic.pp
new file mode 100644
index 0000000..c0213fb
--- /dev/null
+++ b/manifests/profile/base/nova/compute/ironic.pp
@@ -0,0 +1,34 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+# == Class: tripleo::profile::base::nova::compute::ironic
+#
+# Nova Compute Ironic profile for tripleo
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::nova::compute::ironic (
+ $step = hiera('step'),
+) {
+ if $step >= 4 {
+ include ::tripleo::profile::base::nova::compute
+ include ::nova::compute::ironic
+ include ::nova::network::neutron
+ }
+}
diff --git a/manifests/profile/base/nova/compute/libvirt.pp b/manifests/profile/base/nova/compute/libvirt.pp
index 5b6f895..956f8ad 100644
--- a/manifests/profile/base/nova/compute/libvirt.pp
+++ b/manifests/profile/base/nova/compute/libvirt.pp
@@ -26,7 +26,6 @@
class tripleo::profile::base::nova::compute::libvirt (
$step = hiera('step'),
) {
-
if $step >= 4 {
include ::tripleo::profile::base::nova::compute
diff --git a/manifests/profile/base/nova/conductor.pp b/manifests/profile/base/nova/conductor.pp
index 04c9d06..fa9f12b 100644
--- a/manifests/profile/base/nova/conductor.pp
+++ b/manifests/profile/base/nova/conductor.pp
@@ -26,10 +26,8 @@
class tripleo::profile::base::nova::conductor (
$step = hiera('step'),
) {
-
include ::tripleo::profile::base::nova
if $step >= 4 {
include ::nova::conductor
}
-
}
diff --git a/manifests/profile/base/nova/consoleauth.pp b/manifests/profile/base/nova/consoleauth.pp
index 442cf84..8ccfb8c 100644
--- a/manifests/profile/base/nova/consoleauth.pp
+++ b/manifests/profile/base/nova/consoleauth.pp
@@ -26,10 +26,8 @@
class tripleo::profile::base::nova::consoleauth (
$step = hiera('step'),
) {
-
if $step >= 4 {
include ::tripleo::profile::base::nova
include ::nova::consoleauth
}
-
}
diff --git a/manifests/profile/base/nova/libvirt.pp b/manifests/profile/base/nova/libvirt.pp
index 29ef372..889b80d 100644
--- a/manifests/profile/base/nova/libvirt.pp
+++ b/manifests/profile/base/nova/libvirt.pp
@@ -26,7 +26,6 @@
class tripleo::profile::base::nova::libvirt (
$step = hiera('step'),
) {
-
if $step >= 4 {
include ::tripleo::profile::base::nova
include ::nova::compute::libvirt::services
diff --git a/manifests/profile/base/nova/scheduler.pp b/manifests/profile/base/nova/scheduler.pp
index 13b4e82..3c9b2c2 100644
--- a/manifests/profile/base/nova/scheduler.pp
+++ b/manifests/profile/base/nova/scheduler.pp
@@ -26,11 +26,9 @@
class tripleo::profile::base::nova::scheduler (
$step = hiera('step'),
) {
-
if $step >= 4 {
include ::tripleo::profile::base::nova
include ::nova::scheduler
include ::nova::scheduler::filter
}
-
}
diff --git a/manifests/profile/base/nova/vncproxy.pp b/manifests/profile/base/nova/vncproxy.pp
index aa0cc7b..f654fef 100644
--- a/manifests/profile/base/nova/vncproxy.pp
+++ b/manifests/profile/base/nova/vncproxy.pp
@@ -26,10 +26,8 @@
class tripleo::profile::base::nova::vncproxy (
$step = hiera('step'),
) {
-
if $step >= 4 {
include ::tripleo::profile::base::nova
include ::nova::vncproxy
}
-
}