Browse Source

L3 routed networks - subnet fixed_ips (3/3)

When using neutron routed networks we need to specify
either the subnet or a ip address in the fixed-ips-request
when creating neutron ports.

a) For the Vip's:

Adds VipSubnetMap and VipSubnetMapDefaults parameters in
service_net_map.yaml. The two maps are merged, so that the
operator can override the subnet where VIP port should be
hosted. For example:

parameter_defaults:
  VipSubnetMap:
    ctlplane: ctlplane-leaf1
    InternalApi: internal_api_leaf1
    Storage: storage_leaf1
    redis: internal_api_leaf1

b) For overcloud node ports:

Enrich 'networks' in roles defenition to include both
network and subnet data. Changes the list to a map
instead of a list of strings. New schema:

- name: <role_name>
  networks:
    <network_name>
      subnet: <subnet_name>

For backward compatibility a conditional is used to check
if the data is a map or not. In either case the internal
list of role networks is created as '_role_networks' in
the jinja2 templates.

When the data is a map, and the map contains the 'subnet'
key the subnet specified in roles_data.yaml is used as
the subnet in the fixed-ips-reqest when ports are created.
If subnet is not set (or role.networks is not a map) the
default will be {{network.name_lower}}_subnet.

Also, since the fixed_ips request passed to Vip ports are no
longer [] by default, the conditinal has been updated to
test for 'ip_address' entries in the request.

Partial: blueprint tripleo-routed-networks-templates
Depends-On: I773a38fd903fe287132151a4d178326a46890969
Change-Id: I77edc82723d00bfece6752b5dd2c79137db93443
tags/10.3.0
Harald Jensås 1 year ago
parent
commit
2f2d8183e6
59 changed files with 559 additions and 201 deletions
  1. 17
    6
      environments/network-isolation-no-tunneling.j2.yaml
  2. 18
    7
      environments/network-isolation-v6.j2.yaml
  3. 16
    5
      environments/network-isolation.j2.yaml
  4. 17
    6
      network/config/2-linux-bonds-vlans/role.role.j2.yaml
  5. 13
    2
      network/config/bond-with-vlans/role.role.j2.yaml
  6. 13
    2
      network/config/multiple-nics/role.role.j2.yaml
  7. 14
    3
      network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml
  8. 12
    1
      network/config/single-nic-vlans/role.role.j2.yaml
  9. 3
    1
      network/ports/ctlplane_vip.yaml
  10. 3
    1
      network/ports/port.j2
  11. 3
    1
      network/ports/vip.yaml
  12. 3
    1
      network/ports/vip_v6.yaml
  13. 36
    0
      network/service_net_map.j2.yaml
  14. 38
    12
      overcloud.j2.yaml
  15. 5
    2
      puppet/role.role.j2.yaml
  16. 48
    0
      releasenotes/notes/composable-network-subnets-fbfcb6283a54ace7.yaml
  17. 6
    3
      roles/BlockStorage.yaml
  18. 4
    2
      roles/CephAll.yaml
  19. 4
    2
      roles/CephFile.yaml
  20. 4
    2
      roles/CephObject.yaml
  21. 4
    2
      roles/CephStorage.yaml
  22. 6
    3
      roles/Compute.yaml
  23. 6
    3
      roles/ComputeAlt.yaml
  24. 6
    3
      roles/ComputeDVR.yaml
  25. 8
    4
      roles/ComputeHCI.yaml
  26. 6
    3
      roles/ComputeInstanceHA.yaml
  27. 6
    3
      roles/ComputeLiquidio.yaml
  28. 6
    3
      roles/ComputeOvsDpdk.yaml
  29. 6
    3
      roles/ComputeOvsDpdkRT.yaml
  30. 6
    3
      roles/ComputePPC64LE.yaml
  31. 6
    3
      roles/ComputeRealTime.yaml
  32. 6
    3
      roles/ComputeSriov.yaml
  33. 6
    3
      roles/ComputeSriovRT.yaml
  34. 10
    5
      roles/Controller.yaml
  35. 10
    5
      roles/ControllerAllNovaStandalone.yaml
  36. 10
    5
      roles/ControllerNoCeph.yaml
  37. 10
    5
      roles/ControllerNovaStandalone.yaml
  38. 10
    5
      roles/ControllerOpenstack.yaml
  39. 12
    6
      roles/ControllerStorageNfs.yaml
  40. 2
    1
      roles/Database.yaml
  41. 8
    4
      roles/HciCephAll.yaml
  42. 8
    4
      roles/HciCephFile.yaml
  43. 8
    4
      roles/HciCephMon.yaml
  44. 8
    4
      roles/HciCephObject.yaml
  45. 4
    2
      roles/IronicConductor.yaml
  46. 2
    1
      roles/Messaging.yaml
  47. 4
    2
      roles/Networker.yaml
  48. 4
    2
      roles/Novacontrol.yaml
  49. 6
    3
      roles/ObjectStorage.yaml
  50. 6
    3
      roles/OpenShiftAllInOne.yaml
  51. 4
    2
      roles/OpenShiftInfra.yaml
  52. 6
    3
      roles/OpenShiftMaster.yaml
  53. 4
    2
      roles/OpenShiftWorker.yaml
  54. 10
    5
      roles/Standalone.yaml
  55. 4
    2
      roles/Telemetry.yaml
  56. 10
    5
      roles/Undercloud.yaml
  57. 32
    16
      roles_data.yaml
  58. 10
    5
      roles_data_undercloud.yaml
  59. 2
    2
      tools/yaml-validate.py

+ 17
- 6
environments/network-isolation-no-tunneling.j2.yaml View File

@@ -23,12 +23,23 @@ resource_registry:
23 23
 
24 24
   # Port assignments for each role are determined by the role definition.
25 25
 {%- for role in roles %}
26
+{#-     Convert net map or net list to internal list of networks #}
27
+{#-     NOTE(hjensas): For backward compatibility support role data with both #}
28
+{#-                    networks map (new schema) and network list (old schema). #}
29
+{%-     set _role_networks = [] %}
30
+{%-     if role.networks is mapping %}
31
+{%-         for key,val in role.networks.items() %}
32
+{%-             set _role_networks = _role_networks.append(key) %}
33
+{%-         endfor %}
34
+{%-     else %}
35
+{%-         set _role_networks = role.networks %}
36
+{%-     endif %}
26 37
   # Port assignments for the {{role.name}} role.
27
-  {%- for network in networks %}
28
-    {%- if network.name in role.networks|default([]) and network.enabled|default(true) and network.name != 'Tenant'%}
38
+{%-     for network in networks %}
39
+{%-         if network.name in _role_networks and network.enabled|default(true) and network.name != 'Tenant'%}
29 40
   OS::TripleO::{{role.name}}::Ports::{{network.name}}Port: ../network/ports/{{network.name_lower|default(network.name.lower())}}.yaml
30
-    {%- elif network.enabled|default(true) %}
41
+{%-         elif network.enabled|default(true) %}
31 42
   OS::TripleO::{{role.name}}::Ports::{{network.name}}Port: ../network/ports/noop.yaml
32
-    {%- endif %}
33
-  {%- endfor %}
34
-{% endfor %}
43
+{%-         endif %}
44
+{%-     endfor %}
45
+{%- endfor %}

+ 18
- 7
environments/network-isolation-v6.j2.yaml View File

@@ -35,16 +35,27 @@ resource_registry:
35 35
 
36 36
   # Port assignments by role, edit role definition to assign networks to roles.
37 37
 {%- for role in roles %}
38
+{#-     Convert net map or net list to internal list of networks #}
39
+{#-     NOTE(hjensas): For backward compatibility support role data with both #}
40
+{#-                    networks map (new schema) and network list (old schema). #}
41
+{%-     set _role_networks = [] %}
42
+{%-     if role.networks is mapping %}
43
+{%-         for key,val in role.networks.items() %}
44
+{%-             set _role_networks = _role_networks.append(key) %}
45
+{%-         endfor %}
46
+{%-     else %}
47
+{%-         set _role_networks = role.networks %}
48
+{%-     endif %}
38 49
   # Port assignments for the {{role.name}}
39
-  {%- for network in networks %}
40
-    {%- if network.name in role.networks|default([]) and network.enabled|default(true) and network.name != 'Tenant' %}
50
+{%-     for network in networks %}
51
+{%-         if network.name in _role_networks and network.enabled|default(true) and network.name != 'Tenant' %}
41 52
   OS::TripleO::{{role.name}}::Ports::{{network.name}}Port: ../network/ports/{{network.name_lower|default(network.name.lower())}}_v6.yaml
42
-    {%- elif network.name in role.networks|default([]) and network.enabled|default(true) and network.name == 'Tenant' %}
43
-    # IPv4 until OVS and Neutron support IPv6 tunnel endpoints
53
+{%-         elif network.name in _role_networks and network.enabled|default(true) and network.name == 'Tenant' %}
54
+  # IPv4 until OVS and Neutron support IPv6 tunnel endpoints
44 55
   OS::TripleO::{{role.name}}::Ports::{{network.name}}Port: ../network/ports/{{network.name_lower|default(network.name.lower())}}.yaml
45
-    {%- endif %}
46
-  {%- endfor %}
47
-{% endfor %}
56
+{%-         endif %}
57
+{%-     endfor %}
58
+{%- endfor %}
48 59
 
49 60
 
50 61
 parameter_defaults:

+ 16
- 5
environments/network-isolation.j2.yaml View File

@@ -24,10 +24,21 @@ resource_registry:
24 24
 
25 25
   # Port assignments by role, edit role definition to assign networks to roles.
26 26
 {%- for role in roles %}
27
+{#-     Convert net map or net list to internal list of networks #}
28
+{#-     NOTE(hjensas): For backward compatibility support role data with both #}
29
+{#-                    networks map (new schema) and network list (old schema). #}
30
+{%-     set _role_networks = [] %}
31
+{%-     if role.networks is mapping %}
32
+{%-         for key,val in role.networks.items() %}
33
+{%-             set _role_networks = _role_networks.append(key) %}
34
+{%-         endfor %}
35
+{%-     else %}
36
+{%-         set _role_networks = role.networks %}
37
+{%-     endif %}
27 38
   # Port assignments for the {{role.name}}
28
-  {%- for network in networks %}
29
-    {%- if network.name in role.networks|default([]) and network.enabled|default(true) %}
39
+{%-     for network in networks %}
40
+{%-         if network.name in _role_networks and network.enabled|default(true) %}
30 41
   OS::TripleO::{{role.name}}::Ports::{{network.name}}Port: ../network/ports/{{network.name_lower|default(network.name.lower())}}.yaml
31
-    {%- endif %}
32
-  {%- endfor %}
33
-{% endfor %}
42
+{%-         endif %}
43
+{%-     endfor %}
44
+{%- endfor %}

+ 17
- 6
network/config/2-linux-bonds-vlans/role.role.j2.yaml View File

@@ -1,3 +1,14 @@
1
+{#- Convert net map or net list to internal list of networks #}
2
+{#- NOTE(hjensas): For backward compatibility support role data with both #}
3
+{#-                networks map (new schema) and network list (old schema). #}
4
+{%- set _role_networks = [] %}
5
+{%- if role.networks is mapping %}
6
+{%-     for key,val in role.networks.items() %}
7
+{%-         set _role_networks = _role_networks.append(key) %}
8
+{%-     endfor %}
9
+{%- else %}
10
+{%-     set _role_networks = role.networks %}
11
+{%- endif %}
1 12
 heat_template_version: rocky
2 13
 description: >
3 14
   Software Config to drive os-net-config with 2 Linux bonds. One bond is on a
@@ -32,7 +43,7 @@ parameters:
32 43
       guaranteed to pass through the data path of the segments in the network.
33 44
       (The parameter is automatically resolved from the ctlplane network's mtu attribute.)
34 45
     type: number
35
-{%- for network in networks if network.enabled|default(true) and network.name in role.networks %}
46
+{%- for network in networks if network.enabled|default(true) and network.name in _role_networks %}
36 47
 
37 48
   {{network.name}}IpSubnet:
38 49
     default: ''
@@ -110,7 +121,7 @@ resources:
110 121
           expression: $.data.max()
111 122
           data:
112 123
             - {get_param: ControlPlaneMtu}
113
-{%- for network in networks if network.enabled|default(true) and network.name in role.networks and not network.name.startswith('Tenant') %}
124
+{%- for network in networks if network.enabled|default(true) and network.name in _role_networks and not network.name.startswith('Tenant') %}
114 125
             - {get_param: {{network.name}}Mtu}
115 126
 {%- endfor %}
116 127
 
@@ -127,7 +138,7 @@ resources:
127 138
           expression: $.data.max()
128 139
           data:
129 140
             - {get_param: ControlPlaneMtu}
130
-{%- for network in networks if network.name.startswith('Tenant') and network.enabled|default(true) and network.name in role.networks %}
141
+{%- for network in networks if network.name.startswith('Tenant') and network.enabled|default(true) and network.name in _role_networks %}
131 142
             - {get_param: {{network.name}}Mtu}
132 143
 {%- endfor %}
133 144
 
@@ -183,7 +194,7 @@ resources:
183 194
                     name: nic3
184 195
                     mtu:
185 196
                       get_attr: [MinViableMtuBondApi, value]
186
-{%- for network in networks if network.enabled|default(true) and network.name in role.networks and not network.name.startswith('Tenant') %}
197
+{%- for network in networks if network.enabled|default(true) and network.name in _role_networks and not network.name.startswith('Tenant') %}
187 198
               - type: vlan
188 199
                 device: bond_api
189 200
                 mtu:
@@ -224,7 +235,7 @@ resources:
224 235
                     name: nic5
225 236
                     mtu:
226 237
                       get_attr: [MinViableMtuBondData, value]
227
-  {%- for network in networks if network.name.startswith('Tenant') and network.name in role.networks and network.enabled|default(true) %}
238
+  {%- for network in networks if network.name.startswith('Tenant') and network.name in _role_networks and network.enabled|default(true) %}
228 239
               - type: vlan
229 240
                 device: bond-data
230 241
                 mtu:
@@ -247,7 +258,7 @@ resources:
247 258
               - type: ovs_user_bridge
248 259
                 name: br-dpdk0
249 260
                 use_dhcp: false
250
-  {%- for network in networks if network.name.startswith('Tenant') and network.name in role.networks and network.enabled|default(true) %}
261
+  {%- for network in networks if network.name.startswith('Tenant') and network.name in _role_networks and network.enabled|default(true) %}
251 262
                 ovs_extra:
252 263
                   - str_replace:
253 264
                       template: set port br-dpdk0 tag=_VLAN_TAG_

+ 13
- 2
network/config/bond-with-vlans/role.role.j2.yaml View File

@@ -1,3 +1,14 @@
1
+{#- Convert net map or net list to internal list of networks #}
2
+{#- NOTE(hjensas): For backward compatibility support role data with both #}
3
+{#-                networks map (new schema) and network list (old schema). #}
4
+{%- set _role_networks = [] %}
5
+{%- if role.networks is mapping %}
6
+{%-     for key,val in role.networks.items() %}
7
+{%-         set _role_networks = _role_networks.append(key) %}
8
+{%-     endfor %}
9
+{%- else %}
10
+{%-     set _role_networks = role.networks %}
11
+{%- endif %}
1 12
 heat_template_version: rocky
2 13
 description: >
3 14
   Software Config to drive os-net-config with 2 bonded nics on a bridge with VLANs attached for the {{role.name}} role.
@@ -168,7 +179,7 @@ resources:
168 179
                     name: nic3
169 180
                     mtu:
170 181
                       get_attr: [MinViableMtu, value]
171
-{%-     for network in networks if network.enabled|default(true) and network.name in role.networks %}
182
+{%-     for network in networks if network.enabled|default(true) and network.name in _role_networks %}
172 183
                 - type: vlan
173 184
                   mtu:
174 185
                     get_param: {{network.name}}Mtu
@@ -207,7 +218,7 @@ resources:
207 218
                   name: nic3
208 219
                   mtu:
209 220
                     get_attr: [MinViableMtu, value]
210
-{%-     for network in networks if network.enabled|default(true) and network.name in role.networks %}
221
+{%-     for network in networks if network.enabled|default(true) and network.name in _role_networks %}
211 222
               - type: vlan
212 223
                 device: bond_api
213 224
                 mtu:

+ 13
- 2
network/config/multiple-nics/role.role.j2.yaml View File

@@ -1,3 +1,14 @@
1
+{#- Convert net map or net list to internal list of networks #}
2
+{#- NOTE(hjensas): For backward compatibility support role data with both #}
3
+{#-                networks map (new schema) and network list (old schema). #}
4
+{%- set _role_networks = [] %}
5
+{%- if role.networks is mapping %}
6
+{%-     for key,val in role.networks.items() %}
7
+{%-         set _role_networks = _role_networks.append(key) %}
8
+{%-     endfor %}
9
+{%- else %}
10
+{%-     set _role_networks = role.networks %}
11
+{%- endif %}
1 12
 heat_template_version: rocky
2 13
 description: >
3 14
   Software Config to drive os-net-config to configure multiple interfaces for the {{role.name}} role.
@@ -123,7 +134,7 @@ resources:
123 134
 {%- set nics_used = [1] %}
124 135
 {%- for network in networks if network.enabled|default(true) and network.name not in role.networks_skip_config|default([]) %}
125 136
 {%-     if network.name not in ["External", "Tenant"] %}
126
-{%-         if network.name in role.networks %}
137
+{%-         if network.name in _role_networks %}
127 138
               - type: interface
128 139
                 name: nic{{loop.index + 1}}
129 140
                 mtu:
@@ -153,7 +164,7 @@ resources:
153 164
                 dns_servers:
154 165
                   get_param: DnsServers
155 166
                 use_dhcp: false
156
-{%-         if network.name in role.networks %}
167
+{%-         if network.name in _role_networks %}
157 168
                 addresses:
158 169
                 - ip_netmask:
159 170
                     get_param: {{network.name}}IpSubnet

+ 14
- 3
network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml View File

@@ -1,3 +1,14 @@
1
+{#- Convert net map or net list to internal list of networks #}
2
+{#- NOTE(hjensas): For backward compatibility support role data with both #}
3
+{#-                networks map (new schema) and network list (old schema). #}
4
+{%- set _role_networks = [] %}
5
+{%- if role.networks is mapping %}
6
+{%-     for key,val in role.networks.items() %}
7
+{%-         set _role_networks = _role_networks.append(key) %}
8
+{%-     endfor %}
9
+{%- else %}
10
+{%-     set _role_networks = role.networks %}
11
+{%- endif %}
1 12
 heat_template_version: rocky
2 13
 description: >
3 14
   Software Config to drive os-net-config to configure VLANs for the {{role.name}} role.
@@ -31,7 +42,7 @@ parameters:
31 42
       guaranteed to pass through the data path of the segments in the network.
32 43
       (The parameter is automatically resolved from the ctlplane network's mtu attribute.)
33 44
     type: number
34
-{% for network in networks if network.enabled|default(true) and network.name in role.networks %}
45
+{% for network in networks if network.enabled|default(true) and network.name in _role_networks %}
35 46
   {{network.name}}IpSubnet:
36 47
     default: ''
37 48
     description: IP address/subnet on the {{network.name_lower}} network
@@ -93,7 +104,7 @@ resources:
93 104
           expression: $.data.max()
94 105
           data:
95 106
             - {get_param: ControlPlaneMtu}
96
-{%- for network in networks if network.enabled|default(true) and network.name in role.networks %}
107
+{%- for network in networks if network.enabled|default(true) and network.name in _role_networks %}
97 108
             - {get_param: {{network.name}}Mtu}
98 109
 {%- endfor %}
99 110
 
@@ -142,7 +153,7 @@ resources:
142 153
                   mtu:
143 154
                     get_attr: [MinViableMtu, value]
144 155
                   primary: true
145
-{%- for network in networks if network.enabled|default(true) and network.name in role.networks
156
+{%- for network in networks if network.enabled|default(true) and network.name in _role_networks
146 157
     and network.name not in role.networks_skip_config|default([]) %}
147 158
               - type: vlan
148 159
                 mtu:

+ 12
- 1
network/config/single-nic-vlans/role.role.j2.yaml View File

@@ -1,3 +1,14 @@
1
+{#- Convert net map or net list to internal list of networks #}
2
+{#- NOTE(hjensas): For backward compatibility support role data with both #}
3
+{#-                networks map (new schema) and network list (old schema). #}
4
+{%- set _role_networks = [] %}
5
+{%- if role.networks is mapping %}
6
+{%-     for key,val in role.networks.items() %}
7
+{%-         set _role_networks = _role_networks.append(key) %}
8
+{%-     endfor %}
9
+{%- else %}
10
+{%-     set _role_networks = role.networks %}
11
+{%- endif %}
1 12
 heat_template_version: rocky
2 13
 description: >
3 14
   Software Config to drive os-net-config to configure VLANs for the {{role.name}} role.
@@ -143,7 +154,7 @@ resources:
143 154
                     get_attr: [MinViableMtu, value]
144 155
                   # force the MAC address of the bridge to this interface
145 156
                   primary: true
146
-{%- for network in networks if network.enabled|default(true) and network.name in role.networks %}
157
+{%- for network in networks if network.enabled|default(true) and network.name in _role_networks %}
147 158
                 - type: vlan
148 159
                   mtu:
149 160
                     get_param: {{network.name}}Mtu

+ 3
- 1
network/ports/ctlplane_vip.yaml View File

@@ -45,7 +45,9 @@ parameters:
45 45
 conditions:
46 46
   fixed_ip_not_set:
47 47
     equals:
48
-    - get_param: FixedIPs
48
+    - yaql:
49
+        expression: $.data.where($.get('ip_address'))
50
+        data: {get_param: FixedIPs}
49 51
     - []
50 52
 
51 53
 resources:

+ 3
- 1
network/ports/port.j2 View File

@@ -51,7 +51,9 @@ conditions:
51 51
     - ctlplane
52 52
   fixed_ip_not_set:
53 53
     equals:
54
-    - get_param: FixedIPs
54
+    - yaql:
55
+        expression: $.data.where($.get('ip_address'))
56
+        data: {get_param: FixedIPs}
55 57
     - []
56 58
   net_is_ctlplane_and_fixed_ip_not_set:
57 59
     and:

+ 3
- 1
network/ports/vip.yaml View File

@@ -49,7 +49,9 @@ conditions:
49 49
     - ctlplane
50 50
   fixed_ip_not_set:
51 51
     equals:
52
-    - get_param: FixedIPs
52
+    - yaql:
53
+        expression: $.data.where($.get('ip_address'))
54
+        data: {get_param: FixedIPs}
53 55
     - []
54 56
   net_is_ctlplane_and_fixed_ip_not_set:
55 57
     and:

+ 3
- 1
network/ports/vip_v6.yaml View File

@@ -49,7 +49,9 @@ conditions:
49 49
     - ctlplane
50 50
   fixed_ip_not_set:
51 51
     equals:
52
-    - get_param: FixedIPs
52
+    - yaql:
53
+        expression: $.data.where($.get('ip_address'))
54
+        data: {get_param: FixedIPs}
53 55
     - []
54 56
   net_is_ctlplane_and_fixed_ip_not_set:
55 57
     and:

+ 36
- 0
network/service_net_map.j2.yaml View File

@@ -95,6 +95,26 @@ parameters:
95 95
                  via parameter_defaults in the resource registry.
96 96
     type: json
97 97
 
98
+  ControlPlaneSubnet:
99
+    description: The name of the undercloud Neutron control plane subnet
100
+    default: ctlplane-subnet
101
+    type: string
102
+
103
+  VipSubnetMap:
104
+    description: Map of (network_name or service_name) -> subnet_name that
105
+                 defines which subnet to host the VIP.
106
+    default: {}
107
+    type: json
108
+
109
+  VipSubnetMapDefaults:
110
+    default:
111
+      ctlplane: ctlplane-subnet
112
+{%- for network in networks if network.vip|default(false) %}
113
+      {{network.name}}: {{network.name_lower}}_subnet
114
+{%- endfor %}
115
+      redis: internal_api_subnet
116
+    type: json
117
+
98 118
   # We define mappings to work around names that break when doing the
99 119
   # CamelCase to snake_case conversion to align with service_names
100 120
   ServiceNetMapDeprecatedMapping:
@@ -141,6 +161,19 @@ resources:
141 161
              - {get_param: ServiceNetMap}
142 162
              - keys: {get_param: ServiceNetMapDeprecatedMapping}
143 163
 
164
+  VipSubnetMapValue:
165
+    type: OS::Heat::Value
166
+    properties:
167
+      type: json
168
+      value:
169
+        map_merge:
170
+          # (hjensas): We need to map_replace the ctlplane-subnet to support
171
+          # legacy parameter ControlPlaneSubnet.
172
+          - map_replace:
173
+            - {get_param: VipSubnetMapDefaults}
174
+            - values:
175
+                ctlplane-subnet: {get_param: ControlPlaneSubnet}
176
+          - {get_param: VipSubnetMap}
144 177
 
145 178
 outputs:
146 179
   service_net_map:
@@ -155,3 +188,6 @@ outputs:
155 188
         expression: dict($.data.map.items().select([ regex(`([a-z0-9])([A-Z])`).replace($[0], '\\1_\\2').toLower(), $[1]]))
156 189
         data:
157 190
           map: {get_attr: [ServiceNetMapValue, value]}
191
+
192
+  vip_subnet_map:
193
+    value: {get_attr: [VipSubnetMapValue, value]}

+ 38
- 12
overcloud.j2.yaml View File

@@ -110,8 +110,6 @@ parameters:
110 110
         Control the IP allocation for the ControlVirtualIP port. E.g.
111 111
         [{'ip_address':'1.2.3.4'}]
112 112
     type: json
113
-{%- for network in networks if network.vip|default(false) %}
114
-{%- if network.name == 'External' %}
115 113
   # TODO (dsneddon) Legacy name, eventually refactor to match network name
116 114
   PublicVirtualFixedIPs:
117 115
     default: []
@@ -119,14 +117,13 @@ parameters:
119 117
         Control the IP allocation for the PublicVirtualInterface port. E.g.
120 118
         [{'ip_address':'1.2.3.4'}]
121 119
     type: json
122
-{%- else %}
120
+{%- for network in networks if network.vip|default(false) and network.name != 'External' %}
123 121
   {{network.name}}VirtualFixedIPs:
124 122
     default: []
125 123
     description: >
126 124
         Control the IP allocation for the {{network.name}}VirtualInterface port. E.g.
127 125
         [{'ip_address':'1.2.3.4'}]
128 126
     type: json
129
-{%- endif %}
130 127
 {%- endfor %}
131 128
   RabbitCookieSalt:
132 129
     type: string
@@ -269,6 +266,23 @@ conditions:
269 266
   ctlplane_subnet_cidr_set:
270 267
     not:
271 268
       equals: [{get_param: ControlPlaneSubnetCidr}, '']
269
+{%- for network in networks if network.name != 'External' %}
270
+  {{network.name_lower}}_virtual_fixed_ip_set:
271
+    not:
272
+      equals:
273
+        - get_param: {{network.name}}VirtualFixedIPs
274
+        - []
275
+{%- endfor %}
276
+  public_virtual_fixed_ip_set:
277
+    not:
278
+      equals:
279
+        - get_param: PublicVirtualFixedIPs
280
+        - []
281
+  redis_virtual_fixed_ip_set:
282
+    not:
283
+      equals:
284
+        - get_param: RedisVirtualFixedIPs
285
+        - []
272 286
 
273 287
 resources:
274 288
 
@@ -799,20 +813,20 @@ resources:
799 813
     type: OS::TripleO::Network
800 814
 
801 815
   ControlVirtualIP:
816
+    depends_on: [Networks, ServiceNetMap]
802 817
     type: OS::TripleO::Network::Ports::ControlPlaneVipPort
803
-    depends_on: Networks
804 818
     properties:
805 819
       name: control_virtual_ip
806 820
       network: {get_param: NeutronControlPlaneID}
807 821
       fixed_ips:
808 822
         if:
809 823
         - control_fixed_ip_not_set
810
-        - [{subnet: {get_param: ControlPlaneSubnet}}]
824
+        - [{subnet: {get_attr: [ServiceNetMap, vip_subnet_map, ctlplane]}}]
811 825
         - get_param: ControlFixedIPs
812 826
       replacement_policy: AUTO
813 827
 
814 828
   RedisVirtualIP:
815
-    depends_on: Networks
829
+    depends_on: [Networks, ServiceNetMap]
816 830
     type: OS::TripleO::Network::Ports::RedisVipPort
817 831
     properties:
818 832
       ControlPlaneIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
@@ -825,13 +839,17 @@ resources:
825 839
       PortName: redis_virtual_ip
826 840
       NetworkName: {get_attr: [ServiceNetMap, service_net_map, RedisNetwork]}
827 841
       ServiceName: redis
828
-      FixedIPs: {get_param: RedisVirtualFixedIPs}
842
+      FixedIPs:
843
+        if:
844
+        - redis_virtual_fixed_ip_set
845
+        - {get_param: RedisVirtualFixedIPs}
846
+        - [{subnet: {get_attr: [ServiceNetMap, vip_subnet_map, redis]}}]
829 847
 
830 848
 {%- for network in networks if network.vip|default(false) %}
831 849
 {%- if network.name == 'External' %}
832 850
   # The public VIP is on the External net, falls back to ctlplane
833 851
   PublicVirtualIP:
834
-    depends_on: Networks
852
+    depends_on: [Networks, ServiceNetMap]
835 853
     type: OS::TripleO::Network::Ports::ExternalVipPort
836 854
     properties:
837 855
       ControlPlaneIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
@@ -842,10 +860,14 @@ resources:
842 860
           - {str_split: ['/', {get_attr: [ControlVirtualIP, subnets, 0, cidr]}, 1]}
843 861
       ControlPlaneNetwork: {get_param: NeutronControlPlaneID}
844 862
       PortName: public_virtual_ip
845
-      FixedIPs: {get_param: PublicVirtualFixedIPs}
863
+      FixedIPs:
864
+        if:
865
+        - public_virtual_fixed_ip_set
866
+        - {get_param: PublicVirtualFixedIPs}
867
+        - [{subnet: {get_attr: [ServiceNetMap, vip_subnet_map, {{network.name}}]}}]
846 868
 {%- else %}
847 869
   {{network.name}}VirtualIP:
848
-    depends_on: Networks
870
+    depends_on: [Networks, ServiceNetMap]
849 871
     type: OS::TripleO::Network::Ports::{{network.name}}VipPort
850 872
     properties:
851 873
       ControlPlaneIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
@@ -855,7 +877,11 @@ resources:
855 877
           - {get_param: ControlPlaneSubnetCidr}
856 878
           - {str_split: ['/', {get_attr: [ControlVirtualIP, subnets, 0, cidr]}, 1]}
857 879
       PortName: {{network.name_lower}}_virtual_ip
858
-      FixedIPs: {get_param: {{network.name}}VirtualFixedIPs}
880
+      FixedIPs:
881
+        if:
882
+        - {{network.name_lower}}_virtual_fixed_ip_set
883
+        - {get_param: {{network.name}}VirtualFixedIPs}
884
+        - [{subnet: {get_attr: [ServiceNetMap, vip_subnet_map, {{network.name}}]}}]
859 885
 {%- endif %}
860 886
 {%- endfor %}
861 887
 

+ 5
- 2
puppet/role.role.j2.yaml View File

@@ -466,7 +466,11 @@ resources:
466 466
         if:
467 467
           - {{role.name}}_{{network.name}}_fixed_ip_set
468 468
           - [{ip_address: {get_param: [{{role.name}}IPs, '{{network.name_lower}}', {get_param: NodeIndex}]}}]
469
-          - []
469
+{%-     if role.networks is mapping and role.networks.get(network.name) %}
470
+          - [{subnet: {{role.networks[network.name].get('subnet', network.name_lower + '_subnet')}}}]
471
+{%-     else %}
472
+          - [{subnet: {{network.name_lower}}_subnet}]
473
+{%-     endif %}
470 474
       ControlPlaneSubnetCidr:
471 475
         if:
472 476
           - ctlplane_subnet_cidr_set
@@ -476,7 +480,6 @@ resources:
476 480
           - yaql:
477 481
               expression: str("{0}".format($.data).split("/")[-1])
478 482
               data: {get_attr: [{{server_resource_name}}, addresses, ctlplane, 0, subnets, 0, cidr]}
479
-
480 483
       IPPool:
481 484
         map_merge:
482 485
 {%- if role.deprecated_param_ips is defined %}

+ 48
- 0
releasenotes/notes/composable-network-subnets-fbfcb6283a54ace7.yaml View File

@@ -0,0 +1,48 @@
1
+---
2
+features:
3
+  - |
4
+    Composable Networks now support creating L3 routed networks. L3 networks
5
+    use multiple L2 network segments and multiple ip subnets. In addition to
6
+    the base subnet automatically created for any composable network,
7
+    additional subnets can be defined under the ``subnets`` key for each
8
+    network in the data file (``network_data.yaml``) used by composable
9
+    networks. Please refer to the ``network_data_subnets_routed.yaml`` file for
10
+    an example demonstrating how to define composable L3 routed networks.
11
+  - |
12
+    For composable roles it is now possible to control which subnet in a L3
13
+    routed network will host network ports for the role. This is done by
14
+    setting the subnet for each network in the role defenition
15
+    (``roles_data.yaml``). For example::
16
+
17
+      - name: <role_name>
18
+        networks:
19
+        InternalApi:
20
+          subnet: internal_api_leaf2
21
+        Tenant:
22
+          subnet: tenant_leaf2
23
+        Storage:
24
+          subnet: storage_leaf2
25
+  - |
26
+    To enable control of which subnet is used for virtual IPs on L3 routed
27
+    composable networks the new parameter ``VipSubnetMap`` where added. This
28
+    allow the user to override the subnet where the VIP port should be hosted.
29
+    For example::
30
+
31
+      parameter_defaults:
32
+        VipSubnetMap:
33
+          ctlplane: ctlplane-leaf1
34
+          InternalApi: internal_api_leaf1
35
+          Storage: storage_leaf1
36
+          redis: internal_api_leaf1
37
+upgrade:
38
+  - |
39
+    Deployments using custom names for subnets must also set the subnet to use
40
+    for the roles used in the deployment. I.e if ``NetworkNameSubnetName``
41
+    parameter was used to define a non-default subnet name for any network, the
42
+    role defenition (``roles_data.yaml``) and ``VipSubnetMap`` parameter
43
+    must use the same value.
44
+
45
+    .. Warning:: The update will fail if ``<NetworkName>SubnetName`` was used
46
+                 to set a custom subnet name, and the role defenition and/or
47
+                 the ``VipSubnetMap`` is not set to match the custom subnet
48
+                 name.

+ 6
- 3
roles/BlockStorage.yaml View File

@@ -5,9 +5,12 @@
5 5
   description: |
6 6
     Cinder Block Storage node role
7 7
   networks:
8
-    - InternalApi
9
-    - Storage
10
-    - StorageMgmt
8
+    InternalApi:
9
+      subnet: internal_api_subnet
10
+    Storage:
11
+      subnet: storage_subnet
12
+    StorageMgmt:
13
+      subnet: storage_mgmt_subnet
11 14
   uses_deprecated_params: False
12 15
   deprecated_nic_config_name: 'cinder-storage.yaml'
13 16
   ServicesDefault:

+ 4
- 2
roles/CephAll.yaml View File

@@ -5,8 +5,10 @@
5 5
   description: |
6 6
     Standalone Storage Full Role (OSD + MON + RGW + MDS + MGR + RBD Mirroring)
7 7
   networks:
8
-    - Storage
9
-    - StorageMgmt
8
+    Storage:
9
+      subnet: storage_subnet
10
+    StorageMgmt:
11
+      subnet: storage_mgmt_subnet
10 12
   HostnameFormatDefault: '%stackname%-ceph-all-%index%'
11 13
   ServicesDefault:
12 14
     - OS::TripleO::Services::Aide

+ 4
- 2
roles/CephFile.yaml View File

@@ -5,8 +5,10 @@
5 5
   description: |
6 6
     Standalone Scale-out File Role (OSD + MDS)
7 7
   networks:
8
-    - Storage
9
-    - StorageMgmt
8
+    Storage:
9
+      subnet: storage_subnet
10
+    StorageMgmt:
11
+      subnet: storage_mgmt_subnet
10 12
   HostnameFormatDefault: '%stackname%-ceph-file-%index%'
11 13
   ServicesDefault:
12 14
     - OS::TripleO::Services::Aide

+ 4
- 2
roles/CephObject.yaml View File

@@ -5,8 +5,10 @@
5 5
   description: |
6 6
     Standalone Scale-out Object Role (OSD + RGW)
7 7
   networks:
8
-    - Storage
9
-    - StorageMgmt
8
+    Storage:
9
+      subnet: storage_subnet
10
+    StorageMgmt:
11
+      subnet: storage_mgmt_subnet
10 12
   HostnameFormatDefault: '%stackname%-ceph-object-%index%'
11 13
   ServicesDefault:
12 14
     - OS::TripleO::Services::Aide

+ 4
- 2
roles/CephStorage.yaml View File

@@ -5,8 +5,10 @@
5 5
   description: |
6 6
     Ceph OSD Storage node role
7 7
   networks:
8
-    - Storage
9
-    - StorageMgmt
8
+    Storage:
9
+      subnet: storage_subnet
10
+    StorageMgmt:
11
+      subnet: storage_mgmt_subnet
10 12
   uses_deprecated_params: False
11 13
   deprecated_nic_config_name: 'ceph-storage.yaml'
12 14
   ServicesDefault:

+ 6
- 3
roles/Compute.yaml View File

@@ -6,9 +6,12 @@
6 6
     Basic Compute Node role
7 7
   CountDefault: 1
8 8
   networks:
9
-    - InternalApi
10
-    - Tenant
11
-    - Storage
9
+    InternalApi:
10
+      subnet: internal_api_subnet
11
+    Tenant:
12
+      subnet: tenant_subnet
13
+    Storage:
14
+      subnet: storage_subnet
12 15
   HostnameFormatDefault: '%stackname%-novacompute-%index%'
13 16
   RoleParametersDefault:
14 17
     TunedProfileName: "virtual-host"

+ 6
- 3
roles/ComputeAlt.yaml View File

@@ -6,9 +6,12 @@
6 6
    Alternate Compute Node role
7 7
   CountDefault: 0
8 8
   networks:
9
-    - InternalApi
10
-    - Tenant
11
-    - Storage
9
+    InternalApi:
10
+      subnet: internal_api_subnet
11
+    Tenant:
12
+      subnet: tenant_subnet
13
+    Storage:
14
+      subnet: storage_subnet
12 15
   HostnameFormatDefault: '%stackname%-novacomputealt-%index%'
13 16
   disable_constraints: True
14 17
   RoleParametersDefault:

+ 6
- 3
roles/ComputeDVR.yaml View File

@@ -6,9 +6,12 @@
6 6
     DVR enabled Compute Node role
7 7
   CountDefault: 1
8 8
   networks:
9
-    - InternalApi
10
-    - Tenant
11
-    - Storage
9
+    InternalApi:
10
+      subnet: internal_api_subnet
11
+    Tenant:
12
+      subnet: tenant_subnet
13
+    Storage:
14
+      subnet: storage_subnet
12 15
   HostnameFormatDefault: '%stackname%-novacompute-dvr-%index%'
13 16
   RoleParametersDefault:
14 17
     TunedProfileName: "virtual-host"

+ 8
- 4
roles/ComputeHCI.yaml View File

@@ -5,10 +5,14 @@
5 5
   description: |
6 6
     Compute Node role hosting Ceph OSD too
7 7
   networks:
8
-    - InternalApi
9
-    - Tenant
10
-    - Storage
11
-    - StorageMgmt
8
+    InternalApi:
9
+      subnet: internal_api_subnet
10
+    Tenant:
11
+      subnet: tenant_subnet
12
+    Storage:
13
+      subnet: storage_subnet
14
+    StorageMgmt:
15
+      subnet: storage_mgmt_subnet
12 16
   RoleParametersDefault:
13 17
     TunedProfileName: "throughput-performance"
14 18
   ServicesDefault:

+ 6
- 3
roles/ComputeInstanceHA.yaml View File

@@ -6,9 +6,12 @@
6 6
     Compute Instance HA Node role to be used with -e environments/compute-instanceha.yaml
7 7
   CountDefault: 1
8 8
   networks:
9
-    - InternalApi
10
-    - Tenant
11
-    - Storage
9
+    InternalApi:
10
+      subnet: internal_api_subnet
11
+    Tenant:
12
+      subnet: tenant_subnet
13
+    Storage:
14
+      subnet: storage_subnet
12 15
   HostnameFormatDefault: '%stackname%-novacomputeiha-%index%'
13 16
   RoleParametersDefault:
14 17
     TunedProfileName: "virtual-host"

+ 6
- 3
roles/ComputeLiquidio.yaml View File

@@ -6,9 +6,12 @@
6 6
     Compute Node with Cavium Liquidio smart NIC
7 7
   CountDefault: 1
8 8
   networks:
9
-    - InternalApi
10
-    - Tenant
11
-    - Storage
9
+    InternalApi:
10
+      subnet: internal_api_subnet
11
+    Tenant:
12
+      subnet: tenant_subnet
13
+    Storage:
14
+      subnet: storage_subnet
12 15
   networks_skip_config:
13 16
     - Tenant
14 17
   HostnameFormatDefault: '%stackname%-lionovacompute-%index%'

+ 6
- 3
roles/ComputeOvsDpdk.yaml View File

@@ -6,9 +6,12 @@
6 6
     Compute OvS DPDK Role
7 7
   CountDefault: 1
8 8
   networks:
9
-    - InternalApi
10
-    - Tenant
11
-    - Storage
9
+    InternalApi:
10
+      subnet: internal_api_subnet
11
+    Tenant:
12
+      subnet: tenant_subnet
13
+    Storage:
14
+      subnet: storage_subnet
12 15
   deprecated_nic_config_name: 'compute-dpdk.yaml'
13 16
   RoleParametersDefault:
14 17
     VhostuserSocketGroup: "hugetlbfs"

+ 6
- 3
roles/ComputeOvsDpdkRT.yaml View File

@@ -6,9 +6,12 @@
6 6
     Compute OvS DPDK RealTime Role
7 7
   CountDefault: 1
8 8
   networks:
9
-    - InternalApi
10
-    - Tenant
11
-    - Storage
9
+    InternalApi:
10
+      subnet: internal_api_subnet
11
+    Tenant:
12
+      subnet: tenant_subnet
13
+    Storage:
14
+      subnet: storage_subnet
12 15
   ImageDefault: overcloud-realtime-compute
13 16
   RoleParametersDefault:
14 17
     VhostuserSocketGroup: "hugetlbfs"

+ 6
- 3
roles/ComputePPC64LE.yaml View File

@@ -6,9 +6,12 @@
6 6
     Basic Compute Node role for ppc64le servers
7 7
   CountDefault: 0
8 8
   networks:
9
-    - InternalApi
10
-    - Tenant
11
-    - Storage
9
+    InternalApi:
10
+      subnet: internal_api_subnet
11
+    Tenant:
12
+      subnet: tenant_subnet
13
+    Storage:
14
+      subnet: storage_subnet
12 15
   HostnameFormatDefault: '%stackname%-novacomputeppc64le-%index%'
13 16
   ImageDefault: ppc64le-overcloud-full
14 17
   RoleParametersDefault:

+ 6
- 3
roles/ComputeRealTime.yaml View File

@@ -9,9 +9,12 @@
9 9
     accordingly to the hardware of the real-time compute nodes.
10 10
   CountDefault: 1
11 11
   networks:
12
-    - InternalApi
13
-    - Tenant
14
-    - Storage
12
+    InternalApi:
13
+      subnet: internal_api_subnet
14
+    Tenant:
15
+      subnet: tenant_subnet
16
+    Storage:
17
+      subnet: storage_subnet
15 18
   HostnameFormatDefault: '%stackname%-computerealtime-%index%'
16 19
   ImageDefault: overcloud-realtime-compute
17 20
   RoleParametersDefault:

+ 6
- 3
roles/ComputeSriov.yaml View File

@@ -6,9 +6,12 @@
6 6
     Compute SR-IOV Role
7 7
   CountDefault: 1
8 8
   networks:
9
-    - InternalApi
10
-    - Tenant
11
-    - Storage
9
+    InternalApi:
10
+      subnet: internal_api_subnet
11
+    Tenant:
12
+      subnet: tenant_subnet
13
+    Storage:
14
+      subnet: storage_subnet
12 15
   RoleParametersDefault:
13 16
     TunedProfileName: "cpu-partitioning"
14 17
   ServicesDefault:

+ 6
- 3
roles/ComputeSriovRT.yaml View File

@@ -6,9 +6,12 @@
6 6
     Compute SR-IOV RealTime Role
7 7
   CountDefault: 1
8 8
   networks:
9
-    - InternalApi
10
-    - Tenant
11
-    - Storage
9
+    InternalApi:
10
+      subnet: internal_api_subnet
11
+    Tenant:
12
+      subnet: tenant_subnet
13
+    Storage:
14
+      subnet: storage_subnet
12 15
   ImageDefault: overcloud-realtime-compute
13 16
   RoleParametersDefault:
14 17
     TunedProfileName: "realtime-virtual-host"

+ 10
- 5
roles/Controller.yaml View File

@@ -10,11 +10,16 @@
10 10
     - primary
11 11
     - controller
12 12
   networks:
13
-    - External
14
-    - InternalApi
15
-    - Storage
16
-    - StorageMgmt
17
-    - Tenant
13
+    External:
14
+      subnet: external_subnet
15
+    InternalApi:
16
+      subnet: internal_api_subnet
17
+    Storage:
18
+      subnet: storage_subnet
19
+    StorageMgmt:
20
+      subnet: storage_mgmt_subnet
21
+    Tenant:
22
+      subnet: tenant_subnet
18 23
   # For systems with both IPv4 and IPv6, you may specify a gateway network for
19 24
   # each, such as ['ControlPlane', 'External']
20 25
   default_route_networks: ['External']

+ 10
- 5
roles/ControllerAllNovaStandalone.yaml View File

@@ -10,11 +10,16 @@
10 10
     - primary
11 11
     - controller
12 12
   networks:
13
-    - External
14
-    - InternalApi
15
-    - Storage
16
-    - StorageMgmt
17
-    - Tenant
13
+    External:
14
+      subnet: external_subnet
15
+    InternalApi:
16
+      subnet: internal_api_subnet
17
+    Storage:
18
+      subnet: storage_subnet
19
+    StorageMgmt:
20
+      subnet: storage_mgmt_subnet
21
+    Tenant:
22
+      subnet: tenant_subnet
18 23
   default_route_networks: ['External']
19 24
   HostnameFormatDefault: '%stackname%-controller-%index%'
20 25
   ServicesDefault:

+ 10
- 5
roles/ControllerNoCeph.yaml View File

@@ -10,11 +10,16 @@
10 10
     - primary
11 11
     - controller
12 12
   networks:
13
-    - External
14
-    - InternalApi
15
-    - Storage
16
-    - StorageMgmt
17
-    - Tenant
13
+    External:
14
+      subnet: external_subnet
15
+    InternalApi:
16
+      subnet: internal_api_subnet
17
+    Storage:
18
+      subnet: storage_subnet
19
+    StorageMgmt:
20
+      subnet: storage_mgmt_subnet
21
+    Tenant:
22
+      subnet: tenant_subnet
18 23
   default_route_networks: ['External']
19 24
   HostnameFormatDefault: '%stackname%-controller-no-ceph-%index%'
20 25
   # Deprecated & backward-compatible values (FIXME: Make parameters consistent)

+ 10
- 5
roles/ControllerNovaStandalone.yaml View File

@@ -9,11 +9,16 @@
9 9
     - primary
10 10
     - controller
11 11
   networks:
12
-    - External
13
-    - InternalApi
14
-    - Storage
15
-    - StorageMgmt
16
-    - Tenant
12
+    External:
13
+      subnet: external_subnet
14
+    InternalApi:
15
+      subnet: interanl_api_subnet
16
+    Storage:
17
+      subnet: storage_subnet
18
+    StorageMgmt:
19
+      subnet: storage_mgmt_subnet
20
+    Tenant:
21
+      subnet: tenant_subnet
17 22
   default_route_networks: ['External']
18 23
   HostnameFormatDefault: '%stackname%-controller-%index%'
19 24
   ServicesDefault:

+ 10
- 5
roles/ControllerOpenstack.yaml View File

@@ -10,11 +10,16 @@
10 10
     - primary
11 11
     - controller
12 12
   networks:
13
-    - External
14
-    - InternalApi
15
-    - Storage
16
-    - StorageMgmt
17
-    - Tenant
13
+    External:
14
+      subnet: external_subnet
15
+    InternalApi:
16
+      subnet: internal_api_subnet
17
+    Storage:
18
+      subnet: storage_subnet
19
+    StorageMgmt:
20
+      subnet: storage_mgmt_subnet
21
+    Tenant:
22
+      subnet: tenant_subnet
18 23
   default_route_networks: ['External']
19 24
   HostnameFormatDefault: '%stackname%-controller-%index%'
20 25
   ServicesDefault:

+ 12
- 6
roles/ControllerStorageNfs.yaml View File

@@ -13,12 +13,18 @@
13 13
     - primary
14 14
     - controller
15 15
   networks:
16
-    - External
17
-    - InternalApi
18
-    - Storage
19
-    - StorageMgmt
20
-    - StorageNFS
21
-    - Tenant
16
+    External:
17
+      subnet: external_subnet
18
+    InternalApi:
19
+      subnet: internal_api_subnet
20
+    Storage:
21
+      subnet: storage_subnet
22
+    StorageMgmt:
23
+      subnet: storage_mgmt_subnet
24
+    StorageNFS:
25
+      subnet: storage_nfs_subnet
26
+    Tenant:
27
+      subnet: tenant_subnet
22 28
   HostnameFormatDefault: '%stackname%-controller-%index%'
23 29
   # Deprecated & backward-compatible values (FIXME: Make parameters consistent)
24 30
   # Set uses_deprecated_params to True if any deprecated params are used.

+ 2
- 1
roles/Database.yaml View File

@@ -5,7 +5,8 @@
5 5
   description: |
6 6
     Standalone database role with the database being managed via Pacemaker
7 7
   networks:
8
-    - InternalApi
8
+    InternalApi:
9
+      subnet: internal_api_subnet
9 10
   HostnameFormatDefault: '%stackname%-database-%index%'
10 11
   ServicesDefault:
11 12
     - OS::TripleO::Services::Aide

+ 8
- 4
roles/HciCephAll.yaml View File

@@ -5,10 +5,14 @@
5 5
   description: |
6 6
     HCI Full Stack Role (OSD + MON + Nova + RGW + MDS + MGR + RBD Mirroring)
7 7
   networks:
8
-    - InternalApi
9
-    - Tenant
10
-    - Storage
11
-    - StorageMgmt
8
+    InternalApi:
9
+      subnet: internal_api_subnet
10
+    Tenant:
11
+      subnet: tenant_subnet
12
+    Storage:
13
+      subnet: storage_subnet
14
+    StorageMgmt:
15
+      subnet: storage_mgmt_subnet
12 16
   HostnameFormatDefault: '%stackname%-hci-ceph-all-%index%'
13 17
   RoleParametersDefault:
14 18
     TunedProfileName: "throughput-performance"

+ 8
- 4
roles/HciCephFile.yaml View File

@@ -5,10 +5,14 @@
5 5
   description: |
6 6
     HCI Scale-out File Role (OSD + Nova + MDS)
7 7
   networks:
8
-    - InternalApi
9
-    - Tenant
10
-    - Storage
11
-    - StorageMgmt
8
+    InternalApi:
9
+      subnet: internal_api_subnet
10
+    Tenant:
11
+      subnet: tenant_subnet
12
+    Storage:
13
+      subnet: storage_subnet
14
+    StorageMgmt:
15
+      subnet: storage_mgmt_subnet
12 16
   HostnameFormatDefault: '%stackname%-hci-ceph-file-%index%'
13 17
   RoleParametersDefault:
14 18
     TunedProfileName: "throughput-performance"

+ 8
- 4
roles/HciCephMon.yaml View File

@@ -5,10 +5,14 @@
5 5
   description: |
6 6
     HCI Scale-out Block Full Role (OSD + MON + MGR + Nova)
7 7
   networks:
8
-    - InternalApi
9
-    - Tenant
10
-    - Storage
11
-    - StorageMgmt
8
+    InternalApi:
9
+      subnet: internal_api_subnet
10
+    Tenant:
11
+      subnet: tenant_subnet
12
+    Storage:
13
+      subnet: storage_subnet
14
+    StorageMgmt:
15
+      subnet: storage_mgmt_subnet
12 16
   HostnameFormatDefault: '%stackname%-hci-ceph-mon-%index%'
13 17
   RoleParametersDefault:
14 18
     TunedProfileName: "throughput-performance"

+ 8
- 4
roles/HciCephObject.yaml View File

@@ -5,10 +5,14 @@
5 5
   description: |
6 6
     HCI Scale-out Object Role (OSD + Nova + RGW)
7 7
   networks:
8
-    - InternalApi
9
-    - Tenant
10
-    - Storage
11
-    - StorageMgmt
8
+    InternalApi:
9
+      subnet: internal_api_subnet
10
+    Tenant:
11
+      subnet: tenant_subnet
12
+    Storage:
13
+      subnet: storage_subnet
14
+    StorageMgmt:
15
+      subnet: storage_mgmt_subnet
12 16
   HostnameFormatDefault: '%stackname%-hci-ceph-object-%index%'
13 17
   RoleParametersDefault:
14 18
     TunedProfileName: "throughput-performance"

+ 4
- 2
roles/IronicConductor.yaml View File

@@ -5,8 +5,10 @@
5 5
   description: |
6 6
     Ironic Conductor node role
7 7
   networks:
8
-    - InternalApi
9
-    - Storage
8
+    InternalApi:
9
+      subnet: internal_api_subnet
10
+    Storage:
11
+      subnet: storage_subnet
10 12
   HostnameFormatDefault: '%stackname%-ironic-%index%'
11 13
   ServicesDefault:
12 14
     - OS::TripleO::Services::Aide

+ 2
- 1
roles/Messaging.yaml View File

@@ -5,7 +5,8 @@
5 5
   description: |
6 6
     Standalone messaging role with backends being managed via Pacemaker
7 7
   networks:
8
-    - InternalApi
8
+    InternalApi:
9
+      subnet: internal_api_subnet
9 10
   HostnameFormatDefault: '%stackname%-messaging-%index%'
10 11
   ServicesDefault:
11 12
     - OS::TripleO::Services::Aide

+ 4
- 2
roles/Networker.yaml View File

@@ -5,8 +5,10 @@
5 5
   description: |
6 6
     Standalone networking role to run Neutron agents on their own.
7 7
   networks:
8
-    - InternalApi
9
-    - Tenant
8
+    InternalApi:
9
+      subnet: internal_api_subnet
10
+    Tenant:
11
+      subnet: tenant_subnet
10 12
   HostnameFormatDefault: '%stackname%-networker-%index%'
11 13
   ServicesDefault:
12 14
     - OS::TripleO::Services::Aide

+ 4
- 2
roles/Novacontrol.yaml View File

@@ -5,8 +5,10 @@
5 5
   description: |
6 6
     Standalone nova-control role to run Nova control agents on their own.
7 7
   networks:
8
-    - InternalApi
9
-    - Storage
8
+    InternalApi:
9
+      subnet: internal_api_subnet
10
+    Storage:
11
+      subnet: storage_subnet
10 12
   HostnameFormatDefault: '%stackname%-novacontrol-%index%'
11 13
   ServicesDefault:
12 14
     - OS::TripleO::Services::AuditD

+ 6
- 3
roles/ObjectStorage.yaml View File

@@ -5,9 +5,12 @@
5 5
   description: |
6 6
     Swift Object Storage node role
7 7
   networks:
8
-    - InternalApi
9
-    - Storage
10
-    - StorageMgmt
8
+    InternalApi:
9
+      subnet: internal_api_subnet
10
+    Storage:
11
+      subnet: storage_subnet
12
+    StorageMgmt:
13
+      subnet: storage_mgmt_subnet
11 14
   # Deprecated & backward-compatible values (FIXME: Make parameters consistent)
12 15
   # Set uses_deprecated_params to True if any deprecated params are used.
13 16
   uses_deprecated_params: True

+ 6
- 3
roles/OpenShiftAllInOne.yaml View File

@@ -13,9 +13,12 @@
13 13
     - controller
14 14
     - openshift
15 15
   networks:
16
-    - External
17
-    - InternalApi
18
-    - Storage
16
+    External:
17
+      subnet: external_subnet
18
+    InternalApi:
19
+      subnet: internal_api_subnet
20
+    Storage:
21
+      subnet: storage_subnet
19 22
   # For systems with both IPv4 and IPv6, you may specify a gateway network for
20 23
   # each, such as ['ControlPlane', 'External']
21 24
   default_route_networks: ['External']

+ 4
- 2
roles/OpenShiftInfra.yaml View File

@@ -11,8 +11,10 @@
11 11
   tags:
12 12
     - openshift
13 13
   networks:
14
-    - InternalApi
15
-    - Storage
14
+    InternalApi:
15
+      subnet: internal_api_subnet
16
+    Storage:
17
+      subnet: storage_subnet
16 18
   # For systems with both IPv4 and IPv6, you may specify a gateway network for
17 19
   # each, such as ['ControlPlane', 'External']
18 20
   default_route_networks: ['ControlPlane']

+ 6
- 3
roles/OpenShiftMaster.yaml View File

@@ -13,9 +13,12 @@
13 13
     - controller
14 14
     - openshift
15 15
   networks:
16
-    - External
17
-    - InternalApi
18
-    - Storage
16
+    External:
17
+      subnet: external_subnet
18
+    InternalApi:
19
+      subnet: internal_api_subnet
20
+    Storage:
21
+      subnet: storage_subnet
19 22
   # For systems with both IPv4 and IPv6, you may specify a gateway network for
20 23
   # each, such as ['ControlPlane', 'External']
21 24
   default_route_networks: ['External']

+ 4
- 2
roles/OpenShiftWorker.yaml View File

@@ -11,8 +11,10 @@
11 11
   tags:
12 12
     - openshift
13 13
   networks:
14
-    - InternalApi
15
-    - Storage
14
+    InternalApi:
15
+      subnet: internal_api_subnet
16
+    Storage:
17
+      subnet: storage_subnet
16 18
   # For systems with both IPv4 and IPv6, you may specify a gateway network for
17 19
   # each, such as ['ControlPlane', 'External']
18 20
   default_route_networks: ['ControlPlane']

+ 10
- 5
roles/Standalone.yaml View File

@@ -12,11 +12,16 @@
12 12
     - primary
13 13
     - controller
14 14
   networks:
15
-    - External
16
-    - InternalApi
17
-    - Storage
18
-    - StorageMgmt
19
-    - Tenant
15
+    External:
16
+      subnet: external_subnet
17
+    InternalApi:
18
+      subnet: internal_api_subnet
19
+    Storage:
20
+      subnet: storage_subnet
21
+    StorageMgmt:
22
+      subnet: storage_mgmt_subnet
23
+    Tenant:
24
+      subnet: tenant_subnet
20 25
   disable_constraints: True
21 26
   ServicesDefault:
22 27
     - OS::TripleO::Services::Aide

+ 4
- 2
roles/Telemetry.yaml View File

@@ -5,8 +5,10 @@
5 5
   description: |
6 6
     Telemetry role that has all the telemetry services.
7 7
   networks:
8
-    - InternalApi
9
-    - Storage
8
+    InternalApi:
9
+      subnet: internal_api_subnet
10
+    Storage:
11
+      subnet: storage_subnet
10 12
   HostnameFormatDefault: '%stackname%-telemetry-%index%'
11 13
   ServicesDefault:
12 14
     - OS::TripleO::Services::Aide

+ 10
- 5
roles/Undercloud.yaml View File

@@ -11,11 +11,16 @@
11 11
     - primary
12 12
     - controller
13 13
   networks:
14
-    - External
15
-    - InternalApi
16
-    - Storage
17
-    - StorageMgmt
18
-    - Tenant
14
+    External:
15
+      subnet: external_subnet
16
+    InternalApi:
17
+      subnet: internal_api_subnet
18
+    Storage:
19
+      subnet: storage_subnet
20
+    StorageMgmt:
21
+      subnet: storage_mgmt_subnet
22
+    Tenant:
23
+      subnet: tenant_subnet
19 24
   ServicesDefault:
20 25
     - OS::TripleO::Services::Aide
21 26
     - OS::TripleO::Services::AodhApi

+ 32
- 16
roles_data.yaml View File

@@ -13,11 +13,16 @@
13 13
     - primary
14 14
     - controller
15 15
   networks:
16
-    - External
17
-    - InternalApi
18
-    - Storage
19
-    - StorageMgmt
20
-    - Tenant
16
+    External:
17
+      subnet: external_subnet
18
+    InternalApi:
19
+      subnet: internal_api_subnet
20
+    Storage:
21
+      subnet: storage_subnet
22
+    StorageMgmt:
23
+      subnet: storage_mgmt_subnet
24
+    Tenant:
25
+      subnet: tenant_subnet
21 26
   # For systems with both IPv4 and IPv6, you may specify a gateway network for
22 27
   # each, such as ['ControlPlane', 'External']
23 28
   default_route_networks: ['External']
@@ -193,9 +198,12 @@
193 198
     Basic Compute Node role
194 199
   CountDefault: 1
195 200
   networks:
196
-    - InternalApi
197
-    - Tenant
198
-    - Storage
201
+    InternalApi:
202
+      subnet: internal_api_subnet
203
+    Tenant:
204
+      subnet: tenant_subnet
205
+    Storage:
206
+      subnet: storage_subnet
199 207
   HostnameFormatDefault: '%stackname%-novacompute-%index%'
200 208
   RoleParametersDefault:
201 209
     TunedProfileName: "virtual-host"
@@ -265,9 +273,12 @@
265 273
   description: |
266 274
     Cinder Block Storage node role
267 275
   networks:
268
-    - InternalApi
269
-    - Storage
270
-    - StorageMgmt
276
+    InternalApi:
277
+      subnet: internal_api_subnet
278
+    Storage:
279
+      subnet: storage_subnet
280
+    StorageMgmt:
281
+      subnet: storage_mgmt_subnet
271 282
   uses_deprecated_params: False
272 283
   deprecated_nic_config_name: 'cinder-storage.yaml'
273 284
   ServicesDefault:
@@ -307,9 +318,12 @@
307 318
   description: |
308 319
     Swift Object Storage node role
309 320
   networks:
310
-    - InternalApi
311
-    - Storage
312
-    - StorageMgmt
321
+    InternalApi:
322
+      subnet: internal_api_subnet
323
+    Storage:
324
+      subnet: storage_subnet
325
+    StorageMgmt:
326
+      subnet: storage_mgmt_subnet
313 327
   # Deprecated & backward-compatible values (FIXME: Make parameters consistent)
314 328
   # Set uses_deprecated_params to True if any deprecated params are used.
315 329
   uses_deprecated_params: True
@@ -355,8 +369,10 @@
355 369
   description: |
356 370
     Ceph OSD Storage node role
357 371
   networks:
358
-    - Storage
359
-    - StorageMgmt
372
+    Storage:
373
+      subnet: storage_subnet
374
+    StorageMgmt:
375
+      subnet: storage_mgmt_subnet
360 376
   uses_deprecated_params: False
361 377
   deprecated_nic_config_name: 'ceph-storage.yaml'
362 378
   ServicesDefault:

+ 10
- 5
roles_data_undercloud.yaml View File

@@ -14,11 +14,16 @@
14 14
     - primary
15 15
     - controller
16 16
   networks:
17
-    - External
18
-    - InternalApi
19
-    - Storage
20
-    - StorageMgmt
21
-    - Tenant
17
+    External:
18
+      subnet: external_subnet
19
+    InternalApi:
20
+      subnet: internal_api_subnet
21
+    Storage:
22
+      subnet: storage_subnet
23
+    StorageMgmt:
24
+      subnet: storage_mgmt_subnet
25
+    Tenant:
26
+      subnet: tenant_subnet
22 27
   ServicesDefault:
23 28
     - OS::TripleO::Services::Aide
24 29
     - OS::TripleO::Services::AodhApi

+ 2
- 2
tools/yaml-validate.py View File

@@ -478,7 +478,7 @@ def validate_multiarch_compute_roles(role_filename, role_tpl):
478 478
     errors = 0
479 479
     roles_dir = os.path.dirname(role_filename)
480 480
     compute_services = set(role_tpl[0].get('ServicesDefault', []))
481
-    compute_networks = set(role_tpl[0].get('networks', []))
481
+    compute_networks = role_tpl[0].get('networks', [])
482 482
 
483 483
     for arch in ['ppc64le']:
484 484
         arch_filename = os.path.join(roles_dir,
@@ -493,7 +493,7 @@ def validate_multiarch_compute_roles(role_filename, role_tpl):
493 493
             print('ERROR problems with: %s' % (','.join(compute_services.symmetric_difference(arch_services))))
494 494
             errors = 1
495 495
 
496
-        arch_networks = set(arch_tpl[0].get('networks', []))
496
+        arch_networks = arch_tpl[0].get('networks', [])
497 497
         if compute_networks != arch_networks:
498 498
             print('ERROR networks in %s and %s do not match' %
499 499
                   (role_filename, arch_filename))

Loading…
Cancel
Save