Setup:
Using bridge compatibility mode with a fake bridge.

Bridge is br0
Fake bridge is br101
Test tap is tap0

If you add a tap to a fake bridge(br101) and delete the tap without
removing it from the bridge first ovs does not delete the port.
If you add a tap to a regular bridge(br0) and delete the tap without
removing it from the bridge ovs does as expected and deletes the port.

To replicate:

[root@lab openvswitch]# tunctl -t tap0
Set 'tap0' persistent and owned by uid 0
[root@lab openvswitch]# ovs-vsctl list-ports br101
[root@lab openvswitch]# brctl addif br101 tap0
[root@lab openvswitch]# ovs-vsctl list-ports br101
tap0
[root@lab openvswitch]# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             0000.8e0eb30b5741       no              br101
                                                        em2
                                                        tap0
[root@lab openvswitch]# tunctl -d tap0
Set 'tap0' nonpersistent
[root@lab openvswitch]# ovs-vsctl list-ports br101
tap0
[root@lab openvswitch]# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             0000.8e0eb30b5741       no              br101
                                                        em2
[root@lab openvswitch]#


but on the regular bridge it works as expected.

[root@lab openvswitch]# tunctl -t tap0
Set 'tap0' persistent and owned by uid 0
[root@lab openvswitch]# brctl addif br0 tap0
[root@lab openvswitch]# ovs-vsctl list-ports br0
em2
tap0
[root@lab openvswitch]# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             0000.8e0eb30b5741       no              br101
                                                        em2
                                                        tap0
[root@lab openvswitch]# tunctl -d tap0
Set 'tap0' nonpersistent
[root@lab openvswitch]# ovs-vsctl list-ports br0
em2
[root@lab openvswitch]# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             0000.8e0eb30b5741       no              br101
                                                        em2
[root@lab openvswitch]#


If you "brctl delif br101 tap0" before "tunctl -d tap0" then it is
fine. I know that is probably what you would ideally do, but figured a
fake bridge should act the same as a regular one. I discovered this
trying to use bridge compatibility mode with libvirt which doesn't
appear to cleanly remove the tap from the bridge before destroying it
when a VM is shutdown. I am working on fixing that in libvirt but
figured this would be of interested to the openvswitch team. Because
of this issue libvirt and openvswitch can't currently be used together
in this manner. As it currently stands since the port config is not
removed the VM cannot be started again without manually deleting the
port. On VM start it throws an error because it tries to add a port
that already exists.

Other info:

ovs-vswitchd (Open vSwitch) 1.2.90
Compiled Aug 29 2011 22:54:48
OpenFlow versions 0x1:0x1

and release 1.2.1

git rev-parse HEAD
56717eb17c2e2027ea0a2e2957f978dfcd1433b5

No patches

uname -r
2.6.40.3-0.fc15.x86_64
Fedora 15

ovs-dpctl show
system@br0:
        lookups: frags:0, hit:683, missed:92, lost:0
        flows: 0
        port 0: br0 (internal)
        port 1: em2
        port 13: br101 (internal)

If you need other info let me know.

Thanks!
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to