Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
Boron
-
None
-
None
-
Operating System: All
Platform: All
-
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 ||.