network_device_mtu is not applied to VMs, only to agents

Bug #1348788 reported by Ian Wells
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
neutron
Confirmed
Low
Unassigned

Bug Description

(This is using the ML2 driver with the Linuxbridge agent, along with libvirt and KVM. This is likely to be agent-specific, but I think at least some other agents will have the problem.)

1. set Neutron's network_device_mtu to (say) 9000, assuming you've set up an infrastructure that will pass large MTU packets
2. create a network
3. create two VMs on the network
4. attempt to pass large packets

This won't work. The reason it won't work is because, although the Linuxbridge agent does attempt to apply network_device_mtu to the tap interfaces, it's not registered the relevant config item definitions from neutron.agent.linux.interfaces, so the value is silently ignored when the config files are read.

Registering the OPTS block from the interfaces.py file certainly fixes the issue, but is likely to have other effects, since there are several other config files in there that are at present ignored by the agent.

tags: added: lb
Changed in neutron:
importance: Undecided → Low
Changed in neutron:
status: New → Confirmed
assignee: nobody → Eugene Nikanorov (enikanorov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/111748

Changed in neutron:
assignee: Eugene Nikanorov (enikanorov) → Elena Ezhova (eezhova)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Elena Ezhova (<email address hidden>) on branch: master
Review: https://review.openstack.org/111748
Reason: Due to Ian's comments and the spec he provided I abandon this change for now.

Revision history for this message
Elena Ezhova (eezhova) wrote :

There is a BP [1] which targets MTU selection and advertisement and when implemented the problem, described in this bug report, will disappear.
[1] https://review.openstack.org/#/c/105989/

Changed in neutron:
assignee: Elena Ezhova (eezhova) → nobody
status: In Progress → Incomplete
Revision history for this message
Ian Wells (ijw-ubuntu) wrote :

Er, yes, I know, I wrote both this bug and the blueprint. That doesn't make this bug incomplete, it makes it confirmed.

Changed in neutron:
status: Incomplete → Confirmed
Revision history for this message
Akihiro Motoki (amotoki) wrote :

To clarify the situation, network_device_mtu in neutron.conf only affects MTU of interfaces which neutron agent creates.
Regarding VM tap device (on the hypervisor side), it should be controlled by network_device_mtu option in nova.conf (nova-compute).

In addition, I believe MTU advertised by DHCP server (usuaslly dnsmasq invoked by dhcp-agent) should be controlled by another config option. Even though your infrastructure allows larger MTU (like 9000 bytes), there is a case where traffic to external network still need to be 1500 bytes. Users can increase MTU on their VMs to 9000 bytes by their own risk to improve traffic throughput inside a data center.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

[Some addition to my previous comment.]
At now if we want to control MTU advertised by DHCP server (dnsmasq), we need to prepare dnsmasq configuration file and specify this config file in dhcp_agent.ini. It is not a convenient way.
I think it would be nice if we have an option to control MTU size advertised by dnsmasq.
(This option will help environments where MTU needs to be set to some short value (<1500 bytes.))

Revision history for this message
Ian Wells (ijw-ubuntu) wrote :
tags: added: mtu
Revision history for this message
Timothy Swanson (tiswanso) wrote :

The kilo implementation of bp/mtu-selection-and-advertisement adds a mtu attribute to the network resource in the API and the db. The ML2 type drivers calc the MTU value (subtract encap) for each segment of the network and the type manager sets the mtu DB attrib for the network to the lowest of the calc'd segment values. This value is available in the DB (and API) and could be used by the linuxbridge mech driver to do something like setting the tap-interfaces' MTUs as described in this bug.

https://blueprints.launchpad.net/neutron/+spec/mtu-selection-and-advertisement
https://review.openstack.org/#/q/status:merged+project:openstack/neutron+branch:master+topic:bp/mtu-selection-and-advertisement,n,z
https://review.openstack.org/#/c/156318
https://review.openstack.org/#/c/169406 -- https://bugs.launchpad.net/neutron/+bug/1434671 (API extension)

Revision history for this message
Matthew Thode (prometheanfire) wrote :

Testing this I've found the following with a ml2-LB-vxlan config.

It looks like all the interfaces in the namespaces and without except for the VM's tap interface on the nova host have their MTU set correctly. I'm not sure if I'm missing something, but that's it.

tags: added: linuxbridge
removed: lb
Revision history for this message
Ian Wells (ijw-ubuntu) wrote :

Per Matthew's comment, it appears that the MTU change actually fixed this? Can someone confirm it's fixed?

Revision history for this message
Timothy Swanson (tiswanso) wrote :

With the addition of the MTU selection & advertisement parameters and the fix of [1] in Kilo, I don't see any remaining issues fitting this bug description--allowing jumbo frames.

The fix for [1] addressed a Linuxbridge issue where the VM's tap interface would not pick up the MTU of the physical interface attached to the same bridge due to the ordering of adding the interfaces to the bridge.

Could we mark this as a Dup of [1]? or otherwise what is the process to close this out?

[1] https://bugs.launchpad.net/neutron/+bug/1443607

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.