A race condition was observed where OVSDB had already added the VTEP TP
to br-int, and following this Netvirt ELAN Manager added the patch port
(br-ex-patch) to br-int. Upon ELAN manager adding this using
SouthboundUtils addTerminationPoint, the previous VTEP was deleted. This
change modifies the addTerminationPoint to use a merge in MDSAL rather
than a put.
JIRA: OVSDB-472
Change-Id: I2afa7dc33ef915856774f431dd4c3d9bcd029155
Signed-off-by: Tim Rozet <trozet@redhat.com>
InstanceIdentifier<TerminationPoint> tpIid = createTerminationPointInstanceIdentifier(bridgeNode, portName);
tpBuilder.withKey(InstanceIdentifier.keyOf(tpIid));
tpBuilder.addAugmentation(OvsdbTerminationPointAugmentation.class, tpAugmentationBuilder.build());
InstanceIdentifier<TerminationPoint> tpIid = createTerminationPointInstanceIdentifier(bridgeNode, portName);
tpBuilder.withKey(InstanceIdentifier.keyOf(tpIid));
tpBuilder.addAugmentation(OvsdbTerminationPointAugmentation.class, tpAugmentationBuilder.build());
- /* TODO SB_MIGRATION should this be merge or mdsalUtils.put */
- return mdsalUtils.put(LogicalDatastoreType.CONFIGURATION, tpIid, tpBuilder.build());
+ return mdsalUtils.merge(LogicalDatastoreType.CONFIGURATION, tpIid, tpBuilder.build());
}
public Boolean addTerminationPoint(Node bridgeNode, String portName, String type) {
}
public Boolean addTerminationPoint(Node bridgeNode, String portName, String type) {
InstanceIdentifier<TerminationPoint> tpIid = createTerminationPointInstanceIdentifier(bridgeNode, portName);
tpBuilder.withKey(InstanceIdentifier.keyOf(tpIid));
tpBuilder.addAugmentation(OvsdbTerminationPointAugmentation.class, tpAugmentationBuilder.build());
InstanceIdentifier<TerminationPoint> tpIid = createTerminationPointInstanceIdentifier(bridgeNode, portName);
tpBuilder.withKey(InstanceIdentifier.keyOf(tpIid));
tpBuilder.addAugmentation(OvsdbTerminationPointAugmentation.class, tpAugmentationBuilder.build());
- /* TODO SB_MIGRATION should this be merge or mdsalUtils.put */
- return mdsalUtils.put(LogicalDatastoreType.CONFIGURATION, tpIid, tpBuilder.build());
+ return mdsalUtils.merge(LogicalDatastoreType.CONFIGURATION, tpIid, tpBuilder.build());
}
public Boolean addTerminationPoint(Node bridgeNode, String bridgeName, String portName, String type) {
}
public Boolean addTerminationPoint(Node bridgeNode, String bridgeName, String portName, String type) {
TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
tpBuilder.withKey(InstanceIdentifier.keyOf(tpIid));
tpBuilder.addAugmentation(OvsdbTerminationPointAugmentation.class, tpAugmentationBuilder.build());
TerminationPointBuilder tpBuilder = new TerminationPointBuilder();
tpBuilder.withKey(InstanceIdentifier.keyOf(tpIid));
tpBuilder.addAugmentation(OvsdbTerminationPointAugmentation.class, tpAugmentationBuilder.build());
- return mdsalUtils.put(LogicalDatastoreType.CONFIGURATION, tpIid, tpBuilder.build());
+ return mdsalUtils.merge(LogicalDatastoreType.CONFIGURATION, tpIid, tpBuilder.build());
}
public Boolean addPatchTerminationPoint(Node node, String bridgeName, String portName, String peerPortName) {
}
public Boolean addPatchTerminationPoint(Node node, String bridgeName, String portName, String peerPortName) {