Only include neutron::designate class in neutron server

The only service that needs the neutron::designate configuration
options is neutron-server, and if we include it for other neutron
services we may end up with missing config because the relevant
designate hieradata is only generated for neutron-api.

Change-Id: I2c71132a1c3be34b51e81b0932f094cfacadd5aa
Closes-Bug: 1811134
This commit is contained in:
Ben Nemec 2019-01-09 19:14:05 +00:00
parent 2127ee8acc
commit d0b4ecde5c
2 changed files with 8 additions and 9 deletions

View File

@ -82,10 +82,6 @@
# of available agents.
# Defaults to hiera('neutron_dhcp_short_node_names') or []
#
# [*designate_api_enabled*]
# (Optional) Indicate whether Designate is available in the deployment.
# Defaults to hiera('designate_api_enabled') or false
#
# [*container_cli*]
# (Optional) A container CLI to be used with the wrapper
# tooling to manage containers controled by Neutron/OVN
@ -109,7 +105,6 @@ class tripleo::profile::base::neutron (
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
$dhcp_agents_per_network = undef,
$dhcp_nodes = hiera('neutron_dhcp_short_node_names', []),
$designate_api_enabled = hiera('designate_api_enabled', false),
$container_cli = hiera('container_cli', 'docker'),
) {
if $step >= 3 {
@ -154,9 +149,5 @@ class tripleo::profile::base::neutron (
}
include ::neutron::config
include ::neutron::logging
if $designate_api_enabled {
include ::neutron::designate
}
}
}

View File

@ -82,6 +82,10 @@
# enable_internal_tls is set.
# defaults to 9696
#
# [*designate_api_enabled*]
# (Optional) Indicate whether Designate is available in the deployment.
# Defaults to hiera('designate_api_enabled') or false
#
class tripleo::profile::base::neutron::server (
$bootstrap_node = hiera('neutron_api_short_bootstrap_node_name', undef),
$certificates_specs = hiera('apache_certificates_specs', {}),
@ -94,6 +98,7 @@ class tripleo::profile::base::neutron::server (
$tls_proxy_bind_ip = undef,
$tls_proxy_fqdn = undef,
$tls_proxy_port = 9696,
$designate_api_enabled = hiera('designate_api_enabled', false),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@ -130,6 +135,9 @@ class tripleo::profile::base::neutron::server (
}
Tripleo::Tls_proxy['neutron-api'] ~> Anchor<| title == 'neutron::service::begin' |>
}
if $designate_api_enabled {
include ::neutron::designate
}
}
# We start neutron-server on the bootstrap node first, because
# it will try to populate tables and we need to make sure this happens