-
Bug
-
Resolution: Done
-
None
-
Carbon
-
None
-
Operating System: All
Platform: All
-
8930
When deleting the external network, the VPNInterface isn't removed from the Operational DS. The VPNInterface is deleted in Config DS though.
Steps:
1) Stack fresh both Opendaylight and ODL
2) Create external network:
neutron net-create ext-net --router:external --provider:physical_network public --provider:network_type flat
3) The VPNInterface is created in the Operational DS
{
"vpn-interfaces": {
"vpn-interface": [
]
}
}
4) delete external network:
neutron net-delete ext-net
5) The VPNInterface remains in the Operational DS with attribute "scheduled-for-remove" is set to "true". It should be removed as well:
"vpn-interfaces": {
"vpn-interface": [
}
This issue is similar to the NETVIRT-452 (which had been fixed) except for in this case the VPN interface belongs to the external network.
The Op VPNInterface is cleaned up in the VRFEntryListener when the VRFEntry is removed from the Config DS. However, for external network is created without any router, there is no VRFEntry to be removed. Hence the OP VPNInterface is not removed.
Consequently, if we recreate the same external network, in VPNInterfaceManager::processVpnInterfaceUp, the stale Op VPN interface is retrieved when checking if the associated VRFEntries have been removed. The stale OpVPNInterface doesn't have any adjacencies, and the error is thrown as in the below code snippets:
VpnInterface opVpnInterface = VpnUtil.getOperationalVpnInterface(dataBroker, vpnInterface.getName());
if (opVpnInterface != null) {
String opVpnName = opVpnInterface.getVpnInstanceName();
String primaryInterfaceIp = null;
if (opVpnName.equals(vpnName)) {
// Please check if the primary VRF Entry does not exist for VPNInterface
// If so, we have to process ADD, as this might be a DPN Restart with Remove and Add triggered
// back to back
// However, if the primary VRF Entry for this VPNInterface exists, please continue bailing out !
List<Adjacency> adjs = VpnUtil.getAdjacenciesForVpnInterfaceFromConfig(dataBroker, interfaceName);
if (adjs == null) {
LOG.error(
"VPN Interface {} addition failed as adjacencies for this vpn interface could not be "
+ "obtained", interfaceName);
return;
}
~