![Harald Jensås](/assets/img/avatar_default.png)
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
45 lines
2.0 KiB
YAML
45 lines
2.0 KiB
YAML
{%- set primary_role = [roles[0]] -%}
|
|
{%- for role in roles -%}
|
|
{%- if 'primary' in role.tags and 'controller' in role.tags -%}
|
|
{%- set _ = primary_role.pop() -%}
|
|
{%- set _ = primary_role.append(role) -%}
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
{%- set primary_role_name = primary_role[0].name -%}
|
|
# Enable the creation of Neutron networks for isolated Overcloud
|
|
# traffic and configure each role to assign ports (related
|
|
# to that role) on these networks.
|
|
# primary role is: {{primary_role_name}}
|
|
resource_registry:
|
|
# networks as defined in network_data.yaml
|
|
{%- for network in networks if network.enabled|default(true) %}
|
|
OS::TripleO::Network::{{network.name}}: ../network/{{network.name_lower|default(network.name.lower())}}.yaml
|
|
{%- endfor %}
|
|
|
|
# Port assignments for the VIPs
|
|
{%- for network in networks if network.vip and network.enabled|default(true) %}
|
|
OS::TripleO::Network::Ports::{{network.name}}VipPort: ../network/ports/{{network.name_lower|default(network.name.lower())}}.yaml
|
|
{%- endfor %}
|
|
OS::TripleO::Network::Ports::RedisVipPort: ../network/ports/vip.yaml
|
|
|
|
# Port assignments by role, edit role definition to assign networks to roles.
|
|
{%- for role in roles %}
|
|
{#- Convert net map or net list to internal list of networks #}
|
|
{#- NOTE(hjensas): For backward compatibility support role data with both #}
|
|
{#- networks map (new schema) and network list (old schema). #}
|
|
{%- set _role_networks = [] %}
|
|
{%- if role.networks is mapping %}
|
|
{%- for key,val in role.networks.items() %}
|
|
{%- set _role_networks = _role_networks.append(key) %}
|
|
{%- endfor %}
|
|
{%- else %}
|
|
{%- set _role_networks = role.networks %}
|
|
{%- endif %}
|
|
# Port assignments for the {{role.name}}
|
|
{%- for network in networks %}
|
|
{%- if network.name in _role_networks and network.enabled|default(true) %}
|
|
OS::TripleO::{{role.name}}::Ports::{{network.name}}Port: ../network/ports/{{network.name_lower|default(network.name.lower())}}.yaml
|
|
{%- endif %}
|
|
{%- endfor %}
|
|
{%- endfor %}
|