brcompatd works with brctl delif but doesn't with addif

Bug #917309 reported by Rogério Vinhal Nunes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openvswitch (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

I'm using the openvswitch updated version in Oneiric. I've installed Xen and made a xenbr0 bridge in /etc/network/interfaces. When I start the openvswitch initscript it doesn't remove the bridge module, but loads the brcompat module.

With this setup, whenever I edit the bridge using brctl, every delif command removes interfaces from the bridge and also from the ovs bridge, but when I add an interface with brctl addif, it only adds the interface in the bridge, and not in the ovs bridge.

I can manually add the interface using ovs-vsctl add-port <bridge> <interface>, and then delete it again with brctl delif. It works as intended again with delif, but never with addif.

Revision history for this message
Ben Pfaff (blp-nicira) wrote :

> When I start the openvswitch initscript it doesn't remove the bridge module, but loads the brcompat module.
brcompatd should not be enabled by default. Does this mean that you specifically enabled ovs-brcompatd, by installing the openvswitch-brcompat package and editing /etc/default/openvswitch?

I'm not surprised that loading both the brcompat module and the actual bridge module causes problems. They are not meant to be loaded together. I do see, however, that nothing prevents both from being loaded at the same time. This is probably what needs to be fixed.

Revision history for this message
Rogério Vinhal Nunes (rogervn) wrote :

Yes, I manually enabled it in /etc/default/openvswitch.

I used to make brcompatd work in 10.04 with a compiled version by doing a rmmod in bridge, loading brcompat and then restarting the network so that the bridge that was removed due to rmmod would reappear. But in 11.10 when I do rmmod the bridge disappears as expected but when I reload the bridge by restarting the network or by manually doing a brctl addbr, the bridge module automatically reappears.

Examining the openvswitch opening script I find that it only tries to remove the module if there are no bridges up. But what good is brcompatd if there are no bridges up? Even if there are no bridges up and you fire up a bridge manually, but it doesn't work due to the bridge module starting by itself? Not being able to remove the bridge module should also be an error that prevents the brcompatd service from starting as it will do no good to be started in this way.

Is there any way to prevent the bridge module from reappearing?

Revision history for this message
Ben Pfaff (blp-nicira) wrote :

>Examining the openvswitch opening script I find that it only tries to remove the module if there are no bridges up.
...to prevent the script from destroying all of your bridges, if you have some configured.

>But what good is brcompatd if there are no bridges up?
I think you misunderstand the purpose of brcompatd. It is to allow commands such as "brctl addbr" to control Open vSwitch instead of the Linux bridge module. It is not to allow Open vSwitch to control the Linux bridge module.

>Even if there are no bridges up and you fire up a bridge manually, but it doesn't work due to the bridge module starting by itself?
I don't understand that question/statement.

>Not being able to remove the bridge module should also be an error that prevents the brcompatd service from starting as it will do no good to be started in this way.
That's reasonable, and easy to change. I'll send a patch to ovs-dev.

>Is there any way to prevent the bridge module from reappearing?
I think that modprobe has a "blacklist" feature.

Revision history for this message
Rogério Vinhal Nunes (rogervn) wrote :

I don't want brcompat to control the bridge module. I want brcompat to make it possible to REPLACE the bridge kernel module with an OvS switch.

Maybe I wasnt very clear on my environment. I have a host machine running the Xen Hypervisor. Xen Hypervisor works with bridged networking by setting a bridge named xenbr0 with the network interface IP and connecting it to the IP-less network interface. This way, every VM started becomes connected to the xenbr0 bridge along with the physical interface as gateway. I want to make this xenbr0 bridge an OvS switch.

That's why I must have a /etc/network/interfaces entry for the xenbr0 bridge, to configure its IP accordingly.

I tried blacklisting the bridge module in /etc/modprobe.d/blacklist.conf, but after restarting the bridge module is still raising.

Dave Walker (davewalker)
Changed in openvswitch (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Ben Pfaff (blp-nicira) wrote :

>I don't want brcompat to control the bridge module. I want brcompat to make it possible to REPLACE the bridge kernel module with an OvS switch.

OK. That's the purpose of brcompat. Thank you for the report.

I'll see what I can do about fixing this upstream.

Revision history for this message
Ben Pfaff (blp-nicira) wrote :
Revision history for this message
Ben Pfaff (blp-nicira) wrote :

I pushed the fix to master and the branches for 1.2, 1.3, 1.4, and 1.5.

Revision history for this message
Chuck Short (zulcss) wrote :

This should be fixed in precise, according to the comments in the bug report.

Regards
chuck

Changed in openvswitch (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.