[ovs-dev] [PATCH v5 2/6] ovn: Add bridge mappings to ovn-controller.
Ben Pfaff
blp at nicira.com
Fri Jul 31 23:07:20 UTC 2015
On Fri, Jul 31, 2015 at 01:14:41PM -0400, Russell Bryant wrote:
> Add a new OVN configuration entry in the Open_vSwitch database called
> "ovn-bridge-mappings". This allows the configuration of mappings
> between a physical network name and an OVS bridge that provides
> connectivity to that network.
>
> For example, if you wanted to configure "physnet1" to map to "br-eth0"
> and "physnet2" to map to "br-eth1", the configuration would be:
>
> $ ovs-vsctl set open . \
> > external-ids:ovn-bridge-mappings=physnet1:br-eth0,physnet2:br-eth1
>
> Patch ports between these bridges and the integration bridge are
> automatically created and also removed if necessary when the
> configuration changes.
>
> Documentation for this configuration value is introduced in a later
> patch that makes use of this by introducing a "localnet" logical port
> type.
>
> Signed-off-by: Russell Bryant <rbryant at redhat.com>
I tested this with:
make sandbox SANDBOXFLAGS=--ovn
ovs-vsctl add-br br-eth0
ovs-vsctl add-br br-eth1
ovs-vsctl set open . external-ids:ovn-bridge-mappings=physnet1:br-eth0,physnet2:br-eth1
ovs-vsctl show
The results:
Bridge "br-eth1"
Port "patch-br-eth1-to-br-int"
Interface "patch-br-eth1-to-br-int"
type: patch
options: {peer=br-int}
Port "br-eth1"
Interface "br-eth1"
type: internal
Bridge br-int
fail_mode: secure
Port br-int
Interface br-int
type: internal
Port "patch-br-int-to-br-eth0"
Interface "patch-br-int-to-br-eth0"
type: patch
options: {peer="br-eth0"}
Port "patch-br-int-to-br-eth1"
Interface "patch-br-int-to-br-eth1"
type: patch
options: {peer="br-eth1"}
Bridge "br-eth0"
Port "patch-br-eth0-to-br-int"
Interface "patch-br-eth0-to-br-int"
type: patch
options: {peer=br-int}
Port "br-eth0"
Interface "br-eth0"
type: internal
This looks close to correct to me. The "peer" names are all wrong,
though: the peer of a patch port is the name of another patch port, not
the name of another bridge.
I think that the code is intended to remove the patch ports when they
are not longer needed, but when I followed up with:
ovs-vsctl remove open . external-ids ovn-bridge-mappings
ovs-vsctl show
I still saw them.
Thanks,
Ben.
More information about the dev
mailing list