aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilien Macchi <emilien@redhat.com>2017-02-09 14:34:13 -0500
committerEmilien Macchi <emilien@redhat.com>2017-02-09 23:00:42 -0500
commitbb63f514d22ea82d17947a5972b4da16e66b5a36 (patch)
tree14d38fb79d44fb331d1affc470fb17d6fbc43da0
parent3b00ffc728b47e132b3ed8bc460f8697ddb32047 (diff)
Run nova-cell_v2-discover_hosts at step 5
We need to run nova-cell_v2-discover_hosts at the very end of the deployment because nova database needs to be aware of all registred compute hosts. 1. Move keystone resources management at step 3. 2. Move nova-compute service at step 4. 3. Move nova-placement-api at step 3. 5. Run nova-cell_v2-discover_hosts at step 5 on one nova-api node. 6. Run neutron-ovs-agent at step 5 to avoid racy deployments where it starts before neutron-server when doing HA deployments. With that change, we expect Nova aware of all compute services deployed in TripleO during an initial deployment. Depends-On: If943157b2b4afeb640919e77ef0214518e13ee15 Change-Id: I6f2df2a83a248fb5dc21c2bd56029eb45b66ceae Related-Bug: #1663273 Related-Bug: #1663458
-rw-r--r--manifests/profile/base/keystone.pp4
-rw-r--r--manifests/profile/base/neutron/ovs.pp2
-rw-r--r--manifests/profile/base/nova/api.pp7
-rw-r--r--manifests/profile/base/nova/compute.pp2
-rw-r--r--manifests/profile/base/nova/placement.pp2
-rw-r--r--spec/classes/tripleo_profile_base_nova_compute_spec.rb4
6 files changed, 14 insertions, 7 deletions
diff --git a/manifests/profile/base/keystone.pp b/manifests/profile/base/keystone.pp
index 7e70f49..3ff8e63 100644
--- a/manifests/profile/base/keystone.pp
+++ b/manifests/profile/base/keystone.pp
@@ -172,7 +172,7 @@ class tripleo::profile::base::keystone (
include ::keystone::cron::token_flush
}
- if $step >= 4 and $manage_domain {
+ if $step >= 3 and $manage_domain {
if hiera('heat_engine_enabled', false) {
# create these seperate and don't use ::heat::keystone::domain since
# that class writes out the configs
@@ -193,7 +193,7 @@ class tripleo::profile::base::keystone (
}
}
- if $step >= 4 and $manage_endpoint{
+ if $step >= 3 and $manage_endpoint{
if hiera('aodh_api_enabled', false) {
include ::aodh::keystone::auth
}
diff --git a/manifests/profile/base/neutron/ovs.pp b/manifests/profile/base/neutron/ovs.pp
index a4e0cd3..bec7e96 100644
--- a/manifests/profile/base/neutron/ovs.pp
+++ b/manifests/profile/base/neutron/ovs.pp
@@ -28,7 +28,7 @@ class tripleo::profile::base::neutron::ovs(
) {
include ::tripleo::profile::base::neutron
- if $step >= 4 {
+ if $step >= 5 {
include ::neutron::agents::ml2::ovs
# Optional since manage_service may be false and neutron server may not be colocated.
diff --git a/manifests/profile/base/nova/api.pp b/manifests/profile/base/nova/api.pp
index 99911d2..5f3fd5c 100644
--- a/manifests/profile/base/nova/api.pp
+++ b/manifests/profile/base/nova/api.pp
@@ -117,6 +117,13 @@ class tripleo::profile::base::nova::api (
if hiera('nova_enable_db_purge', true) {
include ::nova::cron::archive_deleted_rows
}
+ # At step 5, we consider all nova-compute services started and registred to nova-conductor
+ # So we want to update Nova Cells database to be aware of these hosts by executing the
+ # nova-cell_v2-discover_hosts command again.
+ # Doing it on a single nova-api node to avoid race condition.
+ if $sync_db {
+ Exec<| title == 'nova-cell_v2-discover_hosts' |> { refreshonly => false }
+ }
}
}
diff --git a/manifests/profile/base/nova/compute.pp b/manifests/profile/base/nova/compute.pp
index ec5481a..0eb2ed7 100644
--- a/manifests/profile/base/nova/compute.pp
+++ b/manifests/profile/base/nova/compute.pp
@@ -32,7 +32,7 @@ class tripleo::profile::base::nova::compute (
$cinder_nfs_backend = hiera('cinder_enable_nfs_backend', false),
) {
- if $step >= 5 {
+ if $step >= 4 {
# deploy basic bits for nova
include ::tripleo::profile::base::nova
diff --git a/manifests/profile/base/nova/placement.pp b/manifests/profile/base/nova/placement.pp
index aa8c3c7..c429373 100644
--- a/manifests/profile/base/nova/placement.pp
+++ b/manifests/profile/base/nova/placement.pp
@@ -85,7 +85,7 @@ class tripleo::profile::base::nova::placement (
$tls_keyfile = undef
}
- if $step >= 4 {
+ if $step >= 3 {
class { '::nova::wsgi::apache_placement':
ssl_cert => $tls_certfile,
ssl_key => $tls_keyfile,
diff --git a/spec/classes/tripleo_profile_base_nova_compute_spec.rb b/spec/classes/tripleo_profile_base_nova_compute_spec.rb
index d9433be..a6fdbd6 100644
--- a/spec/classes/tripleo_profile_base_nova_compute_spec.rb
+++ b/spec/classes/tripleo_profile_base_nova_compute_spec.rb
@@ -43,7 +43,7 @@ eos
end
context 'default params' do
- let(:params) { { :step => 5, } }
+ let(:params) { { :step => 4, } }
it {
is_expected.to contain_class('tripleo::profile::base::nova::compute')
@@ -58,7 +58,7 @@ eos
end
context 'cinder nfs backend' do
- let(:params) { { :step => 5, :cinder_nfs_backend => true } }
+ let(:params) { { :step => 4, :cinder_nfs_backend => true } }
it {
is_expected.to contain_class('tripleo::profile::base::nova::compute')