]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Add a new interface driver OVSVethInterfaceDriver.
authorAkihiro MOTOKI <motoki@da.jp.nec.com>
Mon, 10 Sep 2012 13:21:35 +0000 (22:21 +0900)
committerAkihiro MOTOKI <motoki@da.jp.nec.com>
Tue, 11 Sep 2012 17:31:24 +0000 (02:31 +0900)
commitaa5a7aaf47b6cf97a6f35934f68570ecfc16bd4e
tree141416beb498af79847f603a6d91eec7783bd6b4
parentb8ecd0aa22eb2a32a0cf7f20c06f4e046b9f62de
Add a new interface driver OVSVethInterfaceDriver.

Fixes bug 1048681

This commit fixes a bug that quantum agent using a namespace does not
work with NEC plugin. NEC plugin uses an Open vSwitch as an OpenFlow switch,
but an OVS port created by ovs-vsctl add-port becomes down when the port is
moved to some network namespace. Usual OpenFlow controllers respect the
OpenFlow port status. Since DHCP server (dnsmasq) is connected to the down
port, DHCP server disappears from the virtual network.

This behavior can be avoided if we use a similar approach used in
BridgeInterfaceDriver, i.e., we first create a veth pair, add one veth device
to OVS and move the other veth device to a network namespace. To accomplish it
this patch introduces a new interface driver OVSVethInterfaceDriver.

In addition, this patch adds a 'prefix' paramter to unplug(). When deleting
a veth pair, a veth device added to OVS bridge is not removed automatically.
Thus we need a mean to know the veth device name from a device_name to be
removed. It is the reason to add 'prefix' parameter to unplug().

Change-Id: I3f4eae371a27a3171a6a8c9e38ddc9354ed1b6b0
quantum/agent/l3_agent.py
quantum/agent/linux/interface.py
quantum/tests/unit/test_linux_interface.py