Browse Source

Add default value for name_lower in network_data.yaml to update ServiceNetMap

In Pike and later, the name_lower field in network_data.yaml can be
re-defined to contain a custom network name.  When this is done the
ServiceNetMap field must be overridden to reflect the new name in all
places.  This changes adds a new optional field to network_data.yaml
that should be set to the original default name_lower value.
ServiceNetMap will then be automatically updated and will not need
to be overridden.

This also fixes the VipPort naming for the StorageManagement network
to not use a static value.

Change-Id: I8a238038122288899cef49faf38ea2c2ffc2176b
changes/69/574269/4
Bob Fournier 3 years ago
parent
commit
d3eb296e19
  1. 4
      network/service_net_map.j2.yaml
  2. 3
      network_data.yaml
  3. 8
      overcloud.j2.yaml
  4. 8
      releasenotes/notes/custom-network-names-c62a57827d98eea5.yaml

4
network/service_net_map.j2.yaml

@ -127,7 +127,11 @@ resources:
- {get_param: ServiceNetMapDefaults}
- values:
{%- for network in networks %}
{%- if network.service_net_map_replace is defined %}
{{network.service_net_map_replace}}: {{network.name_lower}}
{%- else %}
{{network.name_lower}}: {get_param: {{network.name}}NetName}
{%- endif %}
{%- endfor %}
- map_replace:
- {get_param: ServiceNetMap}

3
network_data.yaml

@ -5,6 +5,9 @@
# name: Name of the network (mandatory)
# name_lower: lowercase version of name used for filenames
# (optional, defaults to name.lower())
# service_net_map_replace: if name_lower is set to a custom name this should be set
# to original default (optional). This field is only necessary when
# changing the default network names, not when adding a new custom network.
# enabled: Is the network enabled (optional, defaults to true)
# NOTE: False will use noop.yaml for unused legacy networks to support upgrades.
# vlan: vlan for the network (optional)

8
overcloud.j2.yaml

@ -794,14 +794,6 @@ resources:
ControlPlaneNetwork: {get_param: NeutronControlPlaneID}
PortName: public_virtual_ip
FixedIPs: {get_param: PublicVirtualFixedIPs}
{%- elif network.name == 'StorageMgmt' %}
{{network.name}}VirtualIP:
depends_on: Networks
type: OS::TripleO::Network::Ports::{{network.name}}VipPort
properties:
ControlPlaneIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
PortName: storage_management_virtual_ip
FixedIPs: {get_param: {{network.name}}VirtualFixedIPs}
{%- else %}
{{network.name}}VirtualIP:
depends_on: Networks

8
releasenotes/notes/custom-network-names-c62a57827d98eea5.yaml

@ -0,0 +1,8 @@
---
fixes:
- The name_lower field in network_data.yaml can be used to
define custom network names but the ServiceNetMap must be
updated with the new names in all places. This change
adds a new field to network_data.yaml - service_net_map_replace,
that should be set to the original name_lower so that ServiceNetMap
will be automatically updated.
Loading…
Cancel
Save