Add basic support for "global_physnet_mtu" and "path_mtu" options.
I've added basic support for "global_physnet_mtu" and "path_mtu" options by allowing to configure them via charm parameters. Change-Id: Ia95533418ccd4b7d1b96270633193ea34b1edecb Partial-Bug: 1650579
This commit is contained in:
parent
9fca38a558
commit
491e501b06
24
config.yaml
24
config.yaml
|
@ -118,6 +118,10 @@ options:
|
||||||
The MTU size for interfaces managed by neutron. If unset or set to
|
The MTU size for interfaces managed by neutron. If unset or set to
|
||||||
0, no value will be applied. This value will be provided to
|
0, no value will be applied. This value will be provided to
|
||||||
neutron-plugin-api relations.
|
neutron-plugin-api relations.
|
||||||
|
.
|
||||||
|
NOTE: This option is deprecated and will be removed in Newton.
|
||||||
|
Please use the system-wide global-physnet-mtu setting which the
|
||||||
|
agents will take into account when wiring VIFs.
|
||||||
neutron-plugin:
|
neutron-plugin:
|
||||||
default: ovs
|
default: ovs
|
||||||
type: string
|
type: string
|
||||||
|
@ -623,3 +627,23 @@ options:
|
||||||
default:
|
default:
|
||||||
description: |
|
description: |
|
||||||
The default type for a tenant network e.g. vxlan, vlan, gre etc
|
The default type for a tenant network e.g. vxlan, vlan, gre etc
|
||||||
|
global-physnet-mtu:
|
||||||
|
type: int
|
||||||
|
default: 1500
|
||||||
|
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.
|
||||||
|
.
|
||||||
|
NOTE: This options is available starting from Mitaka release.
|
||||||
|
path-mtu:
|
||||||
|
type: int
|
||||||
|
default:
|
||||||
|
description: |
|
||||||
|
Maximum size of an IP packet (MTU) that can traverse the
|
||||||
|
underlying physical network infrastructure without fragmentation
|
||||||
|
when using an overlay/tunnel protocol. This option allows
|
||||||
|
specifying a physical network MTU value that differs from the
|
||||||
|
default global-physnet-mtu value.
|
||||||
|
|
|
@ -300,6 +300,14 @@ class NeutronCCContext(context.NeutronContext):
|
||||||
else:
|
else:
|
||||||
ctxt['enable_hyperv'] = False
|
ctxt['enable_hyperv'] = False
|
||||||
|
|
||||||
|
if release >= 'mitaka':
|
||||||
|
if config('global-physnet-mtu'):
|
||||||
|
ctxt['global_physnet_mtu'] = config('global-physnet-mtu')
|
||||||
|
if config('path-mtu'):
|
||||||
|
ctxt['path_mtu'] = config('path-mtu')
|
||||||
|
else:
|
||||||
|
ctxt['path_mtu'] = config('global-physnet-mtu')
|
||||||
|
|
||||||
return ctxt
|
return ctxt
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
# mitaka
|
||||||
|
###############################################################################
|
||||||
|
# [ WARNING ]
|
||||||
|
# Configuration file maintained by Juju. Local changes may be overwritten.
|
||||||
|
###############################################################################
|
||||||
|
[ml2]
|
||||||
|
{% if enable_ml2_port_security -%}
|
||||||
|
extension_drivers=port_security
|
||||||
|
{% endif -%}
|
||||||
|
|
||||||
|
{% if neutron_plugin == 'Calico' -%}
|
||||||
|
type_drivers = local,flat
|
||||||
|
mechanism_drivers = calico
|
||||||
|
{% else -%}
|
||||||
|
type_drivers = {{ tenant_network_types }}
|
||||||
|
tenant_network_types = {{ tenant_network_types }}
|
||||||
|
{% if enable_sriov %}
|
||||||
|
mechanism_drivers = openvswitch,l2population,sriovnicswitch
|
||||||
|
{% elif enable_hyperv %}
|
||||||
|
mechanism_drivers = openvswitch,hyperv,l2population
|
||||||
|
{% else %}
|
||||||
|
mechanism_drivers = openvswitch,l2population
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if path_mtu -%}
|
||||||
|
path_mtu = {{ path_mtu }}
|
||||||
|
{% endif -%}
|
||||||
|
|
||||||
|
[ml2_type_gre]
|
||||||
|
tunnel_id_ranges = 1:1000
|
||||||
|
|
||||||
|
[ml2_type_vxlan]
|
||||||
|
vni_ranges = {{ vni_ranges }}
|
||||||
|
|
||||||
|
[ml2_type_vlan]
|
||||||
|
network_vlan_ranges = {{ vlan_ranges }}
|
||||||
|
|
||||||
|
[ml2_type_flat]
|
||||||
|
flat_networks = {{ network_providers }}
|
||||||
|
|
||||||
|
[ovs]
|
||||||
|
enable_tunneling = True
|
||||||
|
local_ip = {{ local_ip }}
|
||||||
|
|
||||||
|
[agent]
|
||||||
|
tunnel_types = {{ overlay_network_type }}
|
||||||
|
{% endif -%}
|
||||||
|
|
||||||
|
[securitygroup]
|
||||||
|
{% if neutron_security_groups -%}
|
||||||
|
enable_security_group = True
|
||||||
|
{% if neutron_plugin == 'Calico' -%}
|
||||||
|
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
|
||||||
|
{% else -%}
|
||||||
|
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
|
||||||
|
{% endif -%}
|
||||||
|
{% else -%}
|
||||||
|
enable_security_group = False
|
||||||
|
{% endif -%}
|
|
@ -71,6 +71,10 @@ notify_nova_on_port_data_changes = True
|
||||||
|
|
||||||
{% include "section-zeromq" %}
|
{% include "section-zeromq" %}
|
||||||
|
|
||||||
|
{% if global_physnet_mtu -%}
|
||||||
|
global_physnet_mtu = {{ global_physnet_mtu }}
|
||||||
|
{% endif -%}
|
||||||
|
|
||||||
[quotas]
|
[quotas]
|
||||||
{% if quota_driver -%}
|
{% if quota_driver -%}
|
||||||
quota_driver = {{ quota_driver }}
|
quota_driver = {{ quota_driver }}
|
||||||
|
|
Loading…
Reference in New Issue