Fixes dynamic networks falling back to ctlplane
authorTim Rozet <trozet@redhat.com>
Thu, 5 Oct 2017 13:59:49 +0000 (09:59 -0400)
committerTim Rozet <trozet@redhat.com>
Wed, 11 Oct 2017 12:59:00 +0000 (12:59 +0000)
Currently when a network in network_data is disabled it no port
definitions for that network will be created per role.  This results in
no fallback to the ctlplane IP because overriding a type in
network-isolation to noop.yaml does nothing when the port does not exist
for the role.

This patch changes the IPs when a network is disabled to be the same IPs
as ctlplane and fixes the issue, along with removing the need to use
noop.yaml override for ports (non-vip).

Closes-Bug: 1721542

Change-Id: I301370fbf47a71291614dd60e4c64adc7b5ebb42
Signed-off-by: Tim Rozet <trozet@redhat.com>
(cherry picked from commit 9285cb5fc99331ca63ff09df59f26b6018bc781b)

overcloud.j2.yaml
releasenotes/notes/fix-dynamic-network-disabled-9f700a9e900221b6.yaml [new file with mode: 0644]

index 367ac5b..3506fe8 100644 (file)
@@ -491,8 +491,12 @@ resources:
     type: OS::TripleO::Network::Ports::NetIpListMap
     properties:
       ControlPlaneIpList: {get_attr: [{{role.name}}, ip_address]}
-{%- for network in networks if network.enabled|default(true) %}
+{%- for network in networks %}
+  {%- if network.enabled|default(true) %}
       {{network.name}}IpList: {get_attr: [{{role.name}}, {{network.name_lower}}_ip_address]}
+  {%- else %}
+      {{network.name}}IpList: {get_attr: [{{role.name}}, ip_address]}
+  {%- endif %}
 {%- endfor %}
       EnabledServices: {get_attr: [{{role.name}}ServiceNames, value]}
       ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map_lower]}
diff --git a/releasenotes/notes/fix-dynamic-network-disabled-9f700a9e900221b6.yaml b/releasenotes/notes/fix-dynamic-network-disabled-9f700a9e900221b6.yaml
new file mode 100644 (file)
index 0000000..c6cb363
--- /dev/null
@@ -0,0 +1,5 @@
+---
+fixes:
+  - |
+    Fixes dynamic networks to fallback to ctlplane network when they are
+    disabled.