[ovs-discuss] Error when adding vlan interface

Dr. Jens Harbott j.harbott at x-ion.de
Fri Nov 1 13:54:28 UTC 2019


We have a setup with two bridges and two interfaces being added, one
of them is a vlan interface.

# ip link add link ens2 name ens2.2 type vlan id 2
# ovs-vsctl add-br br-ex
# ovs-vsctl add-br br-vlan
# ovs-vsctl add-port br-ex ens1
# ovs-vsctl add-port br-vlan ens2.2

This has been working fine for a while, now we need to migrate this
setup to a new server where instead of 2 x 10G we only have 1 x 25G.
So we added the vlan 2 interface to ens1 and amended the above config
accordingly. This works fine until the server is rebooted, then ens1
fails to be added to ovs and we see something like:

# ovs-vsctl show
f3b156b7-294e-4422-8c70-76767a136d95
    Bridge br-vlan
        Port "ens1.2"
            Interface "ens1.2"
        Port br-vlan
            Interface br-vlan
                type: internal
    Bridge br-ex
        Port br-ex
            Interface br-ex
                type: internal
        Port "ens1"
            Interface "ens1"
                error: "could not add network device ens1 to ofproto
(File exists)"

I can resolve the error by doing first a "del-port ens1.2" (after this
the error on ens1 is resolved) and then re-add ens1.2. This was first
found with the stock version 2.9.2 on Ubuntu Bionic, but I see the
same result on the latest 2.12 stable branch.

Another interesting note is that this seems to depend on the other of
the bridges as shown by "osv-vsctl show", which isn't the same as the
order in which the bridges were created. If I add ens1 to br-vlan and
ens1.2 to br-ex, the setup continues to work fine even after a reboot.


More information about the discuss mailing list