Unblock the CSIT Dual Stack Failure Issues 28/90728/1
authorKarthikeyan Krishnan <karthikeyangceb007@gmail.com>
Fri, 26 Jun 2020 11:22:38 +0000 (16:52 +0530)
committerKarthikeyan Krishnan <karthikeyangceb007@gmail.com>
Fri, 26 Jun 2020 11:29:43 +0000 (16:59 +0530)
commit5daf1f6d5320c6b4b6e87741f7d6fc047be51be0
treed84730b2608798c27957c7452c7f54093b4220a0
parent3c934e9fd80508fa47d694df841056ee68b50430
Unblock the CSIT Dual Stack Failure Issues

Issue:
======
The following exception was seeing from the karaf
log for dual stack network L3 use case testing
post MRI patch[0] merge

Exception:
Change-Id: I5e07f599c2147e1446659d2df870439dbfbd71a3
------------
2020-06-26T11:11:24,156 | ERROR | jobcoordinator-main-task-9 |
NeutronvpnManager                | 360 -
org.opendaylight.netvirt.neutronvpn-impl - 0.11.0.SNAPSHOT | Future
(eventually) failed: addSubnetToVpn: Failed while creating VPN interface
for vpnId 73d6297b-fe26-4563-a228-496ad11f1178, portId
Uuid{_value=6673c43c-9731-4e17-aef0-c4c8abf42829}a5a9eed3-9d77-4ce0-870e-94adb2b89f15,
subnetId {}
java.lang.IllegalArgumentException: Multiple entries with same key:
AdjacencyKey{_ipAddress=10.0.0.2/32}=Adjacency{_adjacencyType=PrimaryAdjacency,
_ipAddress=10.0.0.2/32, _macAddress=fa:16:3e:97:64:b9,
_subnetId=Uuid{_value=125223dd-be4a-404a-b34a-5fcac0b609d3},
augmentation=[]} and
AdjacencyKey{_ipAddress=10.0.0.2/32}=Adjacency{getAdjacencyType=PrimaryAdjacency,
getIpAddress=10.0.0.2/32, getMacAddress=fa:16:3e:97:64:b9,
getSubnetId=Uuid{_value=125223dd-be4a-404a-b34a-5fcac0b609d3},
isPhysNetworkFunc=false, augmentation=[]}. To index multiple values under
a key, use Multimaps.index.

Solution:
==========
Post MRI patch we have changed the List to Map data store for the
VPN interface adjacency. With this patch we have removed the
duplicate VPN interface adjacency before we add into the DS.

[0] https://git.opendaylight.org/gerrit/c/netvirt/+/89660

JIRA: NETVIRT-1677

Change-Id: I76977dcf5644909540d785cd228644d872570e31
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
neutronvpn/impl/src/main/java/org/opendaylight/netvirt/neutronvpn/NeutronvpnManager.java