diff --git a/environments/network-environment-v6.j2.yaml b/environments/network-environment-v6.j2.yaml index 9a4068a38d..4e4e0af62c 100644 --- a/environments/network-environment-v6.j2.yaml +++ b/environments/network-environment-v6.j2.yaml @@ -56,6 +56,14 @@ parameter_defaults: # Routes to add to host_routes property of the subnets in neutron. {{network.name}}Routes: {{network.routes_ipv6|default([])}} {%- endif %} +{%- if network.name == 'Tenant' %} + # MTU of the underlying physical network. Neutron uses this value to + # calculate MTU for all virtual network components. For flat and VLAN + # networks, neutron uses this value without modification. For overlay + # networks such as VXLAN, neutron automatically subtracts the overlay + # protocol overhead from this value. + TenantNetPhysnetMtu: {{network.mtu|default('1500')}} +{%- endif %} {% endfor %} {#- FIXME: These global parameters should be defined in a YAML file, e.g. network_data.yaml. #} # Define the DNS servers (maximum 2) for the overcloud nodes diff --git a/environments/network-environment.j2.yaml b/environments/network-environment.j2.yaml index 012a787c89..fd423f14aa 100644 --- a/environments/network-environment.j2.yaml +++ b/environments/network-environment.j2.yaml @@ -54,6 +54,14 @@ parameter_defaults: # Routes to add to host_routes property of the subnets in neutron. {{network.name}}Routes: {{network.routes|default([])}} {%- endif %} +{%- if network.name == 'Tenant' %} + # MTU of the underlying physical network. Neutron uses this value to + # calculate MTU for all virtual network components. For flat and VLAN + # networks, neutron uses this value without modification. For overlay + # networks such as VXLAN, neutron automatically subtracts the overlay + # protocol overhead from this value. + TenantNetPhysnetMtu: {{network.mtu|default('1500')}} +{%- endif %} {% endfor %} {#- FIXME: These global parameters should be defined in a YAML file, e.g. network_data.yaml. #} # Define the DNS servers (maximum 2) for the overcloud nodes diff --git a/puppet/services/neutron-base.yaml b/puppet/services/neutron-base.yaml index 79d0361d76..9d6e40bbf7 100644 --- a/puppet/services/neutron-base.yaml +++ b/puppet/services/neutron-base.yaml @@ -49,6 +49,16 @@ parameters: Remove configuration that is not generated by TripleO. Used to avoid configuration remnants after upgrades. NeutronGlobalPhysnetMtu: + type: number + default: 0 + description: | + MTU of the underlying physical network. Neutron uses this value to + calculate MTU for all virtual network components. For flat and VLAN + networks, neutron uses this value without modification. For overlay + networks such as VXLAN, neutron automatically subtracts the overlay + protocol overhead from this value. + (If this is not changed TenantNetPhysnetMtu will be used.) + TenantNetPhysnetMtu: type: number default: 1500 description: | @@ -57,6 +67,8 @@ parameters: networks, neutron uses this value without modification. For overlay networks such as VXLAN, neutron automatically subtracts the overlay protocol overhead from this value. + (The mtu setting of the Tenant network in network_data.yaml + control's this parameter.) NeutronDBSyncExtraParams: default: '' description: | @@ -125,6 +137,7 @@ conditions: dhcp_agents_zero: {equals : [{get_param: NeutronDhcpAgentsPerNetwork}, 0]} service_debug_unset: {equals : [{get_param: NeutronDebug}, '']} internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]} + global_physnet_mtu_unset: {equals: [{get_param: NeutronGlobalPhysnetMtu}, 0]} outputs: role_data: @@ -155,7 +168,11 @@ outputs: neutron::db::database_db_max_retries: -1 neutron::db::database_max_retries: -1 neutron::db::sync::db_sync_timeout: {get_param: DatabaseSyncTimeout} - neutron::global_physnet_mtu: {get_param: NeutronGlobalPhysnetMtu} + neutron::global_physnet_mtu: + if: + - global_physnet_mtu_unset + - {get_param: TenantNetPhysnetMtu} + - {get_param: NeutronGlobalPhysnetMtu} neutron::db::sync::extra_params: {get_param: NeutronDBSyncExtraParams} neutron::vlan_transparent: {get_param: EnableVLANTransparency} - if: diff --git a/releasenotes/notes/set-tenant-net-mtu-as-neutron-global-physnet-mtu-5e3515a97e8e0367.yaml b/releasenotes/notes/set-tenant-net-mtu-as-neutron-global-physnet-mtu-5e3515a97e8e0367.yaml new file mode 100644 index 0000000000..d7cf6abbdf --- /dev/null +++ b/releasenotes/notes/set-tenant-net-mtu-as-neutron-global-physnet-mtu-5e3515a97e8e0367.yaml @@ -0,0 +1,10 @@ +--- +features: + - | + The MTU defined for the ``Tenant`` network in network_data is now used to + set neutron's ``global_physnet_mtu`` unless the ``NeutronGlobalPhysnetMtu`` + parameter is used to override the default. (Neutron uses the + ``global_physnet_mtu`` value to calculate MTU for all virtual network + components. For flat and VLAN networks, neutron uses this value without + modification. For overlay networks such as VXLAN, neutron automatically + subtracts the overlay protocol overhead from this value.)