Browse Source

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
Oliver Walsh 2 weeks ago
parent
commit
e096a93e6d
1 changed files with 42 additions and 2 deletions
  1. 42
    2
      overcloud.j2.yaml

+ 42
- 2
overcloud.j2.yaml View File

@@ -151,6 +151,11 @@ parameters:
151 151
     description: Maxiumum batch size for creating nodes
152 152
     type: number
153 153
 
154
+  NovaAdditionalCell:
155
+    default: false
156
+    description: Whether this is an cell additional to the default cell.
157
+    type: boolean
158
+
154 159
   # Jinja loop for Role in role_data.yaml
155 160
 {% for role in roles %}
156 161
   {{role.name}}ExtraConfig:
@@ -284,6 +289,30 @@ conditions:
284 289
       equals:
285 290
         - get_param: RedisVirtualFixedIPs
286 291
         - []
292
+  set_default_mysql_cell_internal:
293
+    or:
294
+      - equals:
295
+        - get_param: NovaAdditionalCell
296
+        - true
297
+      - and:
298
+        - equals:
299
+          - get_param: NovaAdditionalCell
300
+          - false
301
+        - equals:
302
+          - get_param: [EndpointMapOverride, MysqlCellInternal]
303
+          - ''
304
+  set_default_nova_vnc_proxy_cell_public:
305
+    or:
306
+      - equals:
307
+        - get_param: NovaAdditionalCell
308
+        - true
309
+      - and:
310
+        - equals:
311
+          - get_param: NovaAdditionalCell
312
+          - false
313
+        - equals:
314
+          - get_param: [EndpointMapOverride, NovaVNCProxyCellPublic]
315
+          - ''
287 316
 
288 317
 resources:
289 318
 
@@ -390,8 +419,19 @@ resources:
390 419
         map_merge:
391 420
           - {get_attr: [EndpointMap, endpoint_map]}
392 421
           - {get_param: EndpointMapOverride}
393
-          - MysqlCellInternal: {get_attr: [EndpointMap, endpoint_map, MysqlInternal]}
394
-          - NovaVNCProxyCellPublic: {get_attr: [EndpointMap, endpoint_map, NovaVNCProxyPublic]}
422
+            # For parent stack we must set these to the local endpoints
423
+            # For split-controlplane stacks that are nova cells we must set
424
+            # these to the local endpoints
425
+            # For split-controlplane stacks that are not nova cells we should
426
+            # take these from EndpointMapOverride (i.e the parent stack)
427
+          - if:
428
+            - set_default_mysql_cell_internal
429
+            - MysqlCellInternal: {get_attr: [EndpointMap, endpoint_map, MysqlInternal]}
430
+            - {}
431
+          - if:
432
+            - set_default_nova_vnc_proxy_cell_public
433
+            - NovaVNCProxyCellPublic: {get_attr: [EndpointMap, endpoint_map, NovaVNCProxyPublic]}
434
+            - {}
395 435
 
396 436
   SshKnownHostsConfig:
397 437
     type: OS::TripleO::Ssh::KnownHostsConfig

Loading…
Cancel
Save