Do not set the cell endpoints for regular split-controlplane child stacks

When we deploy a nova cell child stack we have to redirect some endpoints to
the local instance instead of the central instance.
For non-nova cell child stacks we must disable this.

Closes-bug: 1823992
Change-Id: If39def80959ad91d96d92882f60e0e4c23b9b85e
This commit is contained in:
Oliver Walsh 2019-04-05 14:47:18 +01:00
parent 8a8d152de3
commit e096a93e6d
1 changed files with 42 additions and 2 deletions

View File

@ -151,6 +151,11 @@ parameters:
description: Maxiumum batch size for creating nodes description: Maxiumum batch size for creating nodes
type: number type: number
NovaAdditionalCell:
default: false
description: Whether this is an cell additional to the default cell.
type: boolean
# Jinja loop for Role in role_data.yaml # Jinja loop for Role in role_data.yaml
{% for role in roles %} {% for role in roles %}
{{role.name}}ExtraConfig: {{role.name}}ExtraConfig:
@ -284,6 +289,30 @@ conditions:
equals: equals:
- get_param: RedisVirtualFixedIPs - get_param: RedisVirtualFixedIPs
- [] - []
set_default_mysql_cell_internal:
or:
- equals:
- get_param: NovaAdditionalCell
- true
- and:
- equals:
- get_param: NovaAdditionalCell
- false
- equals:
- get_param: [EndpointMapOverride, MysqlCellInternal]
- ''
set_default_nova_vnc_proxy_cell_public:
or:
- equals:
- get_param: NovaAdditionalCell
- true
- and:
- equals:
- get_param: NovaAdditionalCell
- false
- equals:
- get_param: [EndpointMapOverride, NovaVNCProxyCellPublic]
- ''
resources: resources:
@ -390,8 +419,19 @@ resources:
map_merge: map_merge:
- {get_attr: [EndpointMap, endpoint_map]} - {get_attr: [EndpointMap, endpoint_map]}
- {get_param: EndpointMapOverride} - {get_param: EndpointMapOverride}
- MysqlCellInternal: {get_attr: [EndpointMap, endpoint_map, MysqlInternal]} # For parent stack we must set these to the local endpoints
- NovaVNCProxyCellPublic: {get_attr: [EndpointMap, endpoint_map, NovaVNCProxyPublic]} # For split-controlplane stacks that are nova cells we must set
# these to the local endpoints
# For split-controlplane stacks that are not nova cells we should
# take these from EndpointMapOverride (i.e the parent stack)
- if:
- set_default_mysql_cell_internal
- MysqlCellInternal: {get_attr: [EndpointMap, endpoint_map, MysqlInternal]}
- {}
- if:
- set_default_nova_vnc_proxy_cell_public
- NovaVNCProxyCellPublic: {get_attr: [EndpointMap, endpoint_map, NovaVNCProxyPublic]}
- {}
SshKnownHostsConfig: SshKnownHostsConfig:
type: OS::TripleO::Ssh::KnownHostsConfig type: OS::TripleO::Ssh::KnownHostsConfig