if (localBucketInfo.isEmpty() ^ remoteBucketInfo.isEmpty()) {
LOG.debug("Deleting local group {} since no local nhs present for "
+ "prefix {}", localGroupEntity.getGroupId(), destPrefix);
- mdsalApiManager.removeGroup(localGroupEntity);
+ mdsalApiManager.syncRemoveGroup(localGroupEntity);
}
return Collections.emptyList();
});
if (localGroupId == FibConstants.INVALID_GROUP_ID) {
LOG.error("Unable to allocate/retrieve local groupId for vpnId {} , prefix {}", parentVpnId, destPrefix);
}
+ GroupEntity remoteGroupEntity = MDSALUtil.buildGroupEntity(
+ dpnId, remoteGroupId, destPrefix, GroupTypes.GroupSelect, Collections.emptyList());
+ GroupEntity localGroupEntity = MDSALUtil.buildGroupEntity(
+ dpnId, localGroupId, destPrefix, GroupTypes.GroupSelect, Collections.emptyList());
String jobKey = FibUtil.getCreateLocalNextHopJobKey(parentVpnId, dpnId, destPrefix);
jobCoordinator.enqueueJob(jobKey, () -> {
- mdsalApiManager.removeGroup(dpnId, remoteGroupId);
- mdsalApiManager.removeGroup(dpnId, localGroupId);
+ mdsalApiManager.syncRemoveGroup(remoteGroupEntity);
+ mdsalApiManager.syncRemoveGroup(localGroupEntity);
if (LOG.isDebugEnabled()) {
LOG.debug("Finished removing GroupEntity with jobCoordinator key {} remoteGroupEntity.groupId {}"
+ "localGroupEntity.groupId {}", jobKey, remoteGroupId, localGroupId);
vrfEntry.getDestPrefix()));
txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, configTx ->
configTx.delete(VpnExtraRouteHelper.getUsedRdsIdentifier(vpnId, vrfEntry.getDestPrefix())));
- nextHopManager.removeNextHopPointer(nextHopManager
- .getRemoteSelectGroupKey(vpnId, vrfEntry.getDestPrefix()));
- nextHopManager.removeNextHopPointer(nextHopManager
- .getLocalSelectGroupKey(vpnId, vrfEntry.getDestPrefix()));
}
}
handleAdjacencyAndVpnOpInterfaceDeletion(vrfEntry, ifName, vpnName, tx);
Optional<Routes> extraRouteOptional;
//Is this fib route an extra route? If yes, get the nexthop which would be an adjacency in the vpn
if (usedRds != null && !usedRds.isEmpty()) {
- jobKey = FibUtil.getJobKeyForRdPrefix(usedRds.get(0), vrfEntry.getDestPrefix());
if (usedRds.size() > 1) {
LOG.error("The extra route prefix is still present in some DPNs");
return ;
.getVpnExtraroutes(dataBroker, vpnName, usedRds.get(0), vrfEntry.getDestPrefix());
}
} else {
- jobKey = FibUtil.getJobKeyForRdPrefix(rd, vrfEntry.getDestPrefix());
extraRouteOptional = Optional.absent();
}
- jobCoordinator.enqueueJob(jobKey,
+ jobCoordinator.enqueueJob(FibUtil.getJobKeyForRdPrefix(rd, vrfEntry.getDestPrefix()),
() -> Collections.singletonList(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
if (localDpnIdList.size() <= 0) {
for (VpnToDpnList curDpn : vpnToDpnList) {
}
}
}
+ nextHopManager.removeNextHopPointer(nextHopManager
+ .getRemoteSelectGroupKey(vpnInstance.getVpnId(), vrfEntry.getDestPrefix()));
+ nextHopManager.removeNextHopPointer(nextHopManager
+ .getLocalSelectGroupKey(vpnInstance.getVpnId(), vrfEntry.getDestPrefix()));
})), MAX_RETRIES);
}