From e096a93e6d19db6829fa0a9eb8d38ab4a89b5963 Mon Sep 17 00:00:00 2001 From: Oliver Walsh Date: Fri, 5 Apr 2019 14:47:18 +0100 Subject: [PATCH] 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 --- overcloud.j2.yaml | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml index 404252599c..ed3488c919 100644 --- a/overcloud.j2.yaml +++ b/overcloud.j2.yaml @@ -151,6 +151,11 @@ parameters: description: Maxiumum batch size for creating nodes 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 {% for role in roles %} {{role.name}}ExtraConfig: @@ -284,6 +289,30 @@ conditions: equals: - 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: @@ -390,8 +419,19 @@ resources: map_merge: - {get_attr: [EndpointMap, endpoint_map]} - {get_param: EndpointMapOverride} - - MysqlCellInternal: {get_attr: [EndpointMap, endpoint_map, MysqlInternal]} - - NovaVNCProxyCellPublic: {get_attr: [EndpointMap, endpoint_map, NovaVNCProxyPublic]} + # For parent stack we must set these to the local endpoints + # 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: type: OS::TripleO::Ssh::KnownHostsConfig