[NETVIRT-410] Autobridge creation overwrites DPNID if bridge already exists Created: 08/Jan/17  Updated: 30/Oct/17  Resolved: 29/May/17

Status: Resolved
Project: netvirt
Component/s: General
Affects Version/s: Boron
Fix Version/s: None

Type: Bug
Reporter: Vishal Thapar Assignee: Vishal Thapar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 7488

 Description   

Autobridge Creation code in ElanManager has a check where it checks if bridge already exists an if it doesn't it creates it. However this check isn't working. If bridge was already present on OVS [created manually before connecting], autobrige logic recreates and overwrites the existing DPNID as generatedMac is set to true.

Steps to reproduce:
-------------------
1. Create 'br-int' on OVS.
2. Run 'sudo ovs-ofctl show br-int -OOpenflow13 |head -1' to get the DPNID.
3. Do 'ovs-vsctl set-manager'
4. Run 'sudo ovs-ofctl show br-int -OOpenflow13 |head -1' to get the DPNID again.

Currently DPNID in step 2 and 4 is different when it should be same.

The bug is in following code in ElanBridgeManager::addBridge():

public boolean addBridge(Node ovsdbNode, String bridgeName, String mac) {
boolean rv = true;
if (!southboundUtils.isBridgeOnOvsdbNode(ovsdbNode, bridgeName)

southboundUtils.getBridgeFromConfig(ovsdbNode, bridgeName) == null)
Unknown macro: { Class<? extends DatapathTypeBase> dpType = null; if (isUserSpaceEnabled()) { dpType = DatapathTypeNetdev.class; } rv = southboundUtils.addBridge(ovsdbNode, bridgeName, southboundUtils.getControllersFromOvsdbNode(ovsdbNode), dpType, mac); }

return rv;
}

Currently it checks if bridge doesn't exist in operational or isn't configured in config. In this particular case, it is present in operational but not configured, so the IF condition is ALWAYS TRUE. It should be && instead of ||.



 Comments   
Comment by Vishal Thapar [ 08/Jan/17 ]

Master: https://git.opendaylight.org/gerrit/50112

Comment by Koby Aizer [ 12/Jan/17 ]

Raising bug to critical as this is causing tunneling issues after ODL node failures in clustering suite

Comment by Vishal Thapar [ 30/Jan/17 ]

Re-opening as it is still an issue. Even without mac change any existing configured datapath-id gets overwritten because autobridge creation logic overwrites any existing other_config, which includes datapath-id. Proper fix would require retaining config from existing bridge and only add to it but that change will be more intrusive. Also, there should be an option to disable auto-bridge altogether.

Comment by Vishal Thapar [ 29/May/17 ]

Fully fixed by https://git.opendaylight.org/gerrit/#/c/53857/

Generated at Wed Feb 07 20:21:29 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.