Set MTU=1400 for GRE and VXLAN tenant networks

On GRE / VXLAN tenant networks, the instance MTU should be lower
than the physical network card MTU to avoid fragmentation.

With this patch, Packstack will detect those cases and set mtu for
instances to 1400 using DHCP. The instance OS should have proper
support for this, e.g. Cirros is known to work starting on version
0.33.

Change-Id: Ibea6a8ee4bf582c10f50e24d9c4bc76ff474ada2
This commit is contained in:
Javier Pena
2014-11-05 17:48:09 +01:00
committed by Gael Chamoulaud
parent 34ecfcecad
commit a2aea47871
2 changed files with 18 additions and 1 deletions

View File

@@ -845,6 +845,9 @@ def create_dhcp_manifests(config, messages):
for host in network_hosts: for host in network_hosts:
config["CONFIG_NEUTRON_DHCP_HOST"] = host config["CONFIG_NEUTRON_DHCP_HOST"] = host
config['CONFIG_NEUTRON_DHCP_INTERFACE_DRIVER'] = get_if_driver(config) config['CONFIG_NEUTRON_DHCP_INTERFACE_DRIVER'] = get_if_driver(config)
if use_openvswitch_vxlan(config) or use_openvswitch_gre(config):
manifest_data = getManifestTemplate("neutron_dhcp_mtu.pp")
else:
manifest_data = getManifestTemplate("neutron_dhcp.pp") manifest_data = getManifestTemplate("neutron_dhcp.pp")
manifest_file = "%s_neutron.pp" % (host,) manifest_file = "%s_neutron.pp" % (host,)
# Firewall Rules for dhcp in # Firewall Rules for dhcp in

View File

@@ -0,0 +1,14 @@
class { 'neutron::agents::dhcp':
interface_driver => hiera('CONFIG_NEUTRON_DHCP_INTERFACE_DRIVER'),
debug => hiera('CONFIG_DEBUG_MODE'),
dnsmasq_config_file => '/etc/neutron/dnsmasq-neutron.conf',
require => File['/etc/neutron/dnsmasq-neutron.conf'],
}
file { '/etc/neutron/dnsmasq-neutron.conf':
content => 'dhcp-option-force=26,1400',
owner => 'root',
group => 'neutron',
mode => '0640',
}