From bbfce240fca52a0b7d2fbb8df500b31a6cbc6080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Tue, 23 Oct 2018 01:06:20 +0200 Subject: [PATCH] Use mtu of Tenant network to control neutron global_physnet_mtu Change: I11e38f82eb9040f77412fe8ad200fcc48031e2f8 introduced mtu property for composable networks. This change set the MTU of the Tenant network as the global_physnet_mtu for neutron, unless the NeutronGlobalPhysnetMtu is overridden. The default MTU used if no MTU is defined for the Tenant network is 1500. (The same default was previously used for the NeutronGlobalPhysnetMtu parameter.) Change-Id: I5e60d52ad571e1cdb3b82cd1d9947e33fa682bf8 --- environments/network-environment-v6.j2.yaml | 8 ++++++++ environments/network-environment.j2.yaml | 8 ++++++++ puppet/services/neutron-base.yaml | 19 ++++++++++++++++++- ...n-global-physnet-mtu-5e3515a97e8e0367.yaml | 10 ++++++++++ 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/set-tenant-net-mtu-as-neutron-global-physnet-mtu-5e3515a97e8e0367.yaml 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.)