[openstack-dev] [neutron][nova] some conflicts in bridge-mapping in linuxbridge

Li Ma skywalker.nick at gmail.com
Thu Jul 30 09:01:05 UTC 2015

Hi all,

Currently, I'm implementing this blueprint:

This function enables a user-defined pre-existed bridge to connect
instances , rather than creating a new bridge that may break security
rule of some companies.

Neutron code has been done recently, but I find that it is really
difficult to implement due to Nova.

Nova hard-code 'brq' + net-id as bridge name in libvirt configuration.

In nova/network/neutronv2/api.py:

def _nw_info_build_network(self, port, networks, subnets):

1530 elif vif_type == network_model.VIF_TYPE_BRIDGE:
1531 bridge = "brq" + port['network_id']

For example, in flat network type, when Neutron loads a pre-existed
user-defined bridge called 'br-eth1' and would like to let it connect
the instances, it will fail because Nova writes 'brq-net-id' into
libvirt conf file.

I have several solutions for that.

(1) Add the same 'bridge-mapping' configuration in nova.conf for
nova-compute. It is almost the same implementation in OVS-agent.
When nova needs bridge name to process, it first reads that
configuration and then decide which bridge to use.

(2) Let Neutron decide interface name (tap-xxx) and bridge name
(brq-xxx), not Nova. As a result, when creating port, Neutron return
interface name and bridge name to Nova, so Nova has the right device
name to process. This helps Nova get rid of hard-code, but need lots
of work on it.

Pls give some advice. Thanks a lot.

Li Ma (Nick)

More information about the OpenStack-dev mailing list