custom mtu is not propergated correctly in openvswitch environments

Bug #1484415 reported by Michael Witt
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
nova-docker
Fix Committed
Undecided
zhangguoqing

Bug Description

When using neutron with the openvswitch network driver and GRE tunneling it is ofter required to reduce the network device MTU to avoid ethernet frames becoming to big because of the GRE tunneling information that are appended.

When setting a network device MTU in nova.conf (option network_device_mtu) - this setting is only propagated to tapXXX device but not to the nsXXX device in the newly created IP Namespace.

We got this problem solved by adding the following lines to vifs.py in the attach function inside the try block:

            # Setup MTU on if_remote_name is required if it is a non default value
            mtu = CONF.network_device_mtu

            if vif.get('mtu') is not None:
                mtu = vif.get('mtu')

            if mtu is not None:
                utils.execute('ip', 'netns', 'exec', container_id, 'ip', 'link',
                              'set', if_remote_name, 'mtu', mtu, run_as_root=True)

Revision history for this message
Michael Witt (m-witt) wrote :
Changed in nova-docker:
assignee: nobody → zhangguoqing (474751729-o)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova-docker (master)

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

Changed in nova-docker:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova-docker (master)

Reviewed: https://review.openstack.org/213612
Committed: https://git.openstack.org/cgit/stackforge/nova-docker/commit/?id=3b3a0c744de288ef3477c6b2940e6308357777f2
Submitter: Jenkins
Branch: master

commit 3b3a0c744de288ef3477c6b2940e6308357777f2
Author: zhangguoqing <zhang.guoqing@99cloud.net>
Date: Mon Aug 17 14:26:56 2015 +0800

    vif: Setup MTU on if_remote_name when attach

    If vif has the attribute mtu or the network_device_mtu which
    in nova.conf is not default value(None), we should setuping MTU
    on if_remote_name.

    Co-Authored-By: Michael Witt <email address hidden>

    Change-Id: I1dfa7272ed8ddd5f8c9b331992c9019402991c81
    Closes-bug: #1484415

Changed in nova-docker:
status: In Progress → Fix Committed
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.