netvirt.git
3 years agoBump versions by x.y.(z+1) 00/94200/1 stable/magnesium
jenkins-releng [Fri, 11 Dec 2020 08:52:52 +0000 (08:52 +0000)]
Bump versions by x.y.(z+1)

Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: I1157046fe7ad2032a28590490d290034e6327845

3 years agoBump upstream versions 07/93807/2
Robert Varga [Thu, 12 Nov 2020 11:47:52 +0000 (12:47 +0100)]
Bump upstream versions

Pick up:
- odlparent-6.0.12
- yangtools-4.0.14
- mdsal-5.0.16

Change-Id: I1112017e873fef034e648e99894cd0cf45f9502f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions by x.y.(z+1) 99/91999/1
jenkins-releng [Mon, 10 Aug 2020 07:29:35 +0000 (07:29 +0000)]
Bump versions by x.y.(z+1)

Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: I2e46beca5431917ee461f671a2bdc1c5661bf85d

3 years agoBump odlparent/yangtools/mdsal to 6.0.11/4.0.13/5.0.14 65/91565/1
Robert Varga [Wed, 22 Jul 2020 21:36:21 +0000 (23:36 +0200)]
Bump odlparent/yangtools/mdsal to 6.0.11/4.0.13/5.0.14

Pick up latest updates from upstream.

Change-Id: Ieb51a7bf9998e9a48339b71ddca741453a9ada50
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump odlparent/yangtools/mdsal to 6.0.10/4.0.12/5.0.13 93/91393/1
Robert Varga [Fri, 17 Jul 2020 15:27:23 +0000 (17:27 +0200)]
Bump odlparent/yangtools/mdsal to 6.0.10/4.0.12/5.0.13

Pick up latest updates from upstream.

Change-Id: Icfca7da0f2dd6a9c2f6d591f0ea6ae9562f0e8ef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump odlparent/yangtools/mdsal 75/91075/1
Robert Varga [Fri, 10 Jul 2020 05:05:24 +0000 (07:05 +0200)]
Bump odlparent/yangtools/mdsal

This adopts the following versions:
- odlparent-6.0.9
- yangtools-4.0.11
- mdsal-5.0.12

Change-Id: I7b76d2d48a4e08d3ebc05b63994b6ac2d2146850
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions by x.y.(z+1) 92/89792/1
jenkins-releng [Fri, 15 May 2020 01:38:43 +0000 (01:38 +0000)]
Bump versions by x.y.(z+1)

Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: I95c2fe07f9d44e31ed07f4ddd9113df6dfcb9566

4 years agoBump odlparent/yangtools/mdsal 45/89345/2
Robert Varga [Fri, 24 Apr 2020 12:52:00 +0000 (14:52 +0200)]
Bump odlparent/yangtools/mdsal

This adopts the following versions:
- odlparent-6.0.6
- yangtools-4.0.8
- mdsal-5.0.10

Change-Id: Ic5e4ef3a902fa3f601f13392297278f5efa6ce77
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFixup checkstyle 66/89366/1
Robert Varga [Fri, 24 Apr 2020 19:57:38 +0000 (21:57 +0200)]
Fixup checkstyle

Upgraded checkstyle is finding these, fix them up.

Change-Id: I11cf1c40315276e6b14d03e5065b21f5b63e5cc2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoExceptions while running DC-GW Floating-ips Jobs 87/88787/1
Chetan Arakere Gowdru [Mon, 6 Apr 2020 08:26:12 +0000 (13:56 +0530)]
Exceptions while running DC-GW Floating-ips Jobs

JIRA: NETVIRT-1668

Signed-off-by: Chetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
Change-Id: I9f272183261d6d5451dc4931f9dba76d47a8661a

4 years agoBump versions by x.y.(z+1) 24/88524/1
jenkins-releng [Thu, 19 Mar 2020 11:59:38 +0000 (11:59 +0000)]
Bump versions by x.y.(z+1)

Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: I72d9b69b699ab936dca0708732ee1ebc61eeda72

4 years agoUpdate .gitreview to stable/magnesium 89/87889/1
jenkins-releng [Tue, 18 Feb 2020 22:05:26 +0000 (22:05 +0000)]
Update .gitreview to stable/magnesium

Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: I42687cf61c96e44eec1ecd285b3e3f5ac2cb1058

4 years agoTable 21 ecmp flow not updated correctly 25/86325/8
Amitesh Soni [Tue, 10 Dec 2019 12:07:19 +0000 (17:37 +0530)]
Table 21 ecmp flow not updated correctly

Description: When BGP neigbhor is added, quagga advertises routes towards
that DC-GW. If GRE tunnel towards that dc-gw is not configured, table 21
flows are not updated correctly.

Signed-off-by: Amitesh Soni <amitesh.soni@ericsson.com>
Change-Id: I6f54f7d4005dde7f2d05f53a05a27bf2b34a8cbb

4 years agoMinor changes in Elan Manager 35/86735/6
Amitesh Soni [Thu, 9 Jan 2020 06:04:55 +0000 (11:34 +0530)]
Minor changes in Elan Manager

Change in method enqueueJobForMacSpecificTasks: Corrected the
wrong data entry that was being passed during VM migration

Added a few log statements

Signed-off-by: Amitesh Soni <amitesh.soni@ericsson.com>
Change-Id: I1d3fb93f0965605ec9914d84ebaf11d4f8f73c52

4 years agoPorting activity for ELAN 87/83387/8
Amitesh Soni [Thu, 2 Jan 2020 09:31:15 +0000 (15:01 +0530)]
Porting activity for ELAN

Description: Adding 270000 to elan tag for group actions and table 36 to
avoid collision between lport and elan tag

Signed-off-by: Amitesh Soni <amitesh.soni@ericsson.com>
Change-Id: Iea64d20802c0242ac891d95294323a87a5a4cdf2

4 years agoDuplicate RA messages are sending from ODL Controller 27/83227/3
Nishchya Gupta [Wed, 24 Jul 2019 09:24:28 +0000 (14:54 +0530)]
Duplicate RA messages are sending from ODL Controller

Issue:
======
While sending IPv6 periodic RA packets to all Ipv6
VMs OF port ODL controller is sending more than one
time with same RA packets to same ELAN group as a
result each IPv6 VMs OF ports are getting more
than one RA packets for each perodic
UNSOLICTED/CEASE messages.

Solution:
=========
Using IPv6 network ELAN BC group approach sending
IPv6 RA packet from ODL Controller to VMs OF ports
should be one time is sufficient.
Since ELAN BC group will deliver the RA packets to
all IPv6 VMs OF ports for that particular ELAN group.

Change-Id: Ia1564148ce84044754e6a008e1de21a62435459d
Signed-off-by: Nishchya Gupta <nishchyag@altencalsoftlabs.com>
4 years agoId Manager allocateId optimization 65/87565/4
Shashidhar Raja [Tue, 11 Feb 2020 10:25:48 +0000 (15:55 +0530)]
Id Manager allocateId optimization

Id Manager allocateId is called on all nodes for each of the SGs. This was
done for storing id in cache on all the nodes. This was resulting in
LockManager exception in IdManager. Though the exceptions were non
alarming, it was filling up karaf logs. Also, it was invoked on all the
nodes instread on entity owner node.

Now, allocateId for SG is moved to neutronvpn do that it gets executed
only on shard leader node. The id is then stored in Acl datastore for subsequently
to be used by ACL. In ACL, the ACL event listener gets it from Acl and
stores it in cache as it was done earlier.

Change-Id: I0b4c547ff2f4105523746069163cf6255c0cffff
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
4 years agoNETVIRT-1638 Modify yang modules such that it can be validated using pyang 42/87442/2
Nishchya Gupta [Wed, 5 Feb 2020 08:32:31 +0000 (14:02 +0530)]
NETVIRT-1638 Modify yang modules such that it can be validated using pyang

Unused container, removing it.

Signed-off-by: Nishchya Gupta <nishchyag@altencalsoftlabs.com>
Change-Id: Icc332000d01ad75e8c0d1d542ca7331fb1a8f5fd

4 years agoNETVIRT-1638 Modify yang modules such that it can be validated using pyang 72/86972/6
Nishchya Gupta [Thu, 16 Jan 2020 11:22:31 +0000 (16:52 +0530)]
NETVIRT-1638 Modify yang modules such that it can be validated using pyang

Fixing pyang warning and errors.

Signed-off-by: Nishchya Gupta <nishchyag@altencalsoftlabs.com>
Change-Id: I7e23372010d4cbef5b645b90d8628b6af46f294b

4 years agoMoving vpn-interface yang from VPNMgr > NeutronVPN 45/87445/4
Ashik Alias [Wed, 5 Feb 2020 05:50:24 +0000 (11:20 +0530)]
Moving vpn-interface yang from VPNMgr > NeutronVPN

Vpn-instance and Vpn-interface Config Datastore are predominantly
used by the neutron-VPN layer, but the datastore is defined
in VPN manager.
This review will take care of moving Vpn-interface
and associated yang models to neutron-VPN layer.

The second part of this change[1] will take care of moving
VPN-instance DS to neutronvpn

[1] https://git.opendaylight.org/gerrit/#/c/netvirt/+/87418

Change-Id: Iad6e7a8508c5986bd12b8ef6d1e2d8294ecc02d9
Signed-off-by: Ashik Alias <ashik.alias@ericsson.com>
4 years agoMoving vpn-instance yang from VPNMgr > NeutronVPN 18/87418/7
Ashik Alias [Tue, 4 Feb 2020 10:32:52 +0000 (16:02 +0530)]
Moving vpn-instance yang from VPNMgr > NeutronVPN

Vpn-instance and Vpn-interface Config Datastore are predominantly
used by the neutron-VPN layer, but the datastore is defined in
VPN manager. This review will take care of moving Vpn-instance
and associated yang models to neutron-VPN layer.

The second part of this change[1] will take care of moving
VPN-interface DS to neutronvpn

[1] https://git.opendaylight.org/gerrit/#/c/netvirt/+/87445/

Change-Id: I3c191d4f4acfc304548b0bfe954f80e75212d599
Signed-off-by: Ashik Alias <ashik.alias@ericsson.com>
4 years agoNeutronVpn: Robust handling of (lock, ID allocation/release) failures 79/87479/3
Ashik Alias [Thu, 6 Feb 2020 11:07:43 +0000 (16:37 +0530)]
NeutronVpn: Robust handling of (lock, ID allocation/release) failures

Change-Id: Ic4fd1c8a558bc5f9351b3d06dc2258c6fc4f6d9c
Signed-off-by: Ashik Alias <ashik.alias@ericsson.com>
4 years agoFix for cluster reboot 13/83013/13
vasudha_yenuganti [Wed, 10 Jul 2019 12:11:55 +0000 (17:41 +0530)]
Fix for cluster reboot

This fix makes sure that after cluster reboot, the
vpnInstanceOpData comes up correctly for a vpn.
Primarily, the focus of this fix is to not have
importing VPNs create issues in building assets
for exporting VPNs.

Change-Id: I0e321904e067117d077fba4284420274c051f1a5
Signed-off-by: vasudha_yenuganti <yenuganti.vasudha@ericsson.com>
4 years agoVpnEngine: Robust handling of (lock, ID allocation/release) failures 64/87464/7
Yenuganti Vasudha [Thu, 6 Feb 2020 08:07:26 +0000 (13:37 +0530)]
VpnEngine: Robust handling of (lock, ID allocation/release) failures

Signed-off-by: Yenuganti Vasudha <yenuganti.vasudha@ericsson.com>
Change-Id: Ie3ff8d197c96cbf5a2a5d91e55708cd228a1d22c

4 years agoSubnet route is not advertised to FIB table... 22/83222/18
Surendar Raju [Wed, 24 Jul 2019 06:56:13 +0000 (12:26 +0530)]
Subnet route is not advertised to FIB table...

Issue:In this there is vm present in vpn.While
deleting this type of vpn, the entire vrf entry
is removed before the actual vpn is deleted.
Hence transcation commit failure happens,
which results in breakoff inbetween.

Solution:This scenario is expected, but to
avoid the break-off we had added fix to
handle the exception, which results in flow
continuous.

Change-Id: I959cfc12d3490210235cf853d03fe2562c27be47
Signed-off-by: Surendar Raju <surendar.raju@ericsson.com>
4 years agoARP Responder stale flow after undeployment 24/83024/10
Surendar Raju [Fri, 12 Jul 2019 07:12:32 +0000 (12:42 +0530)]
ARP Responder stale flow after undeployment

Issue:
======

At scale, its possible that after all ports are deleted , even if subnet
is deleted later , during VpnInterface remove processing , backpull of
Neutron DS like subnets is bound to fail. Due to this , ArpResponder flow
deletion might fail.

Fix:
===
Subnet-Gateway-IP which is read from Neutron Subnet DS, will be stored in
VpnInterface oper DS, thus avoiding backpull.

Change-Id: I703091e6cde2f7b8b31488178d72eee703aa712d
Signed-off-by: Surendar Raju <surendar.raju@ericsson.com>
4 years agoELAN stale flow issue during VM migration 60/86860/4
Amitesh Soni [Mon, 13 Jan 2020 10:47:06 +0000 (16:17 +0530)]
ELAN stale flow issue during VM migration

1) removing VpnPortIpToPort Listener in ELAN

* ELAN used to listen to VPNPortIptoPort data store
  for programming flows for MACs related to learnt IPs
* This is redundant since ELAN learns MAC by itself through table 50
* And this listener code could possibly lead to race
  conditions during VM migration leading to stale flows.

2) Fix for stale table 52 flows during migration

Removing the method createElanInterfaceTablesList to avoid
'modifiedNodeDoesNotExistException' when VM is migrated
from one DPN to another DPN, and delete and add ELAN
interface tries to update the same ElanInterfaceTablesList DS
improperly.

Signed-off-by: Amitesh Soni <amitesh.soni@ericsson.com>
Change-Id: Ib7ff56a89042362a74c6b8a241e1b2073b68d320

4 years agoVNF route did not appear as no parentrefs 71/87371/3
Karthikeyan Krishnan [Mon, 3 Feb 2020 08:33:07 +0000 (14:03 +0530)]
VNF route did not appear as no parentrefs

Issue:
======
VNF route did not appear in fib/flows due to interface manager did not
update the parentref

Solution:
==========
We are not updating parentrefs for VM interfaces via
northbound calls, but rather via southbound events through
InterfaceManager.
Hence, any missed events for port updates also need not update the
parentrefs.

Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
Change-Id: I4824579e997f3fb18033f73d120a8d8dd65024c3

4 years agoMissed Table 246 flow 88/87388/3
Shashidhar Raja [Mon, 3 Feb 2020 11:32:32 +0000 (17:02 +0530)]
Missed Table 246 flow

Table 246 flow was getting programmed from different thread than the other
flows. This was resulting in different remote group id cache sometimes.
Different cache details was the reason for not programming table 246 flows
all the time.

Table 246 flow programming is done alone with other flows in same thread
now to resolve this issue.

Change-Id: I93bacc68a63c924036c7649f3f5a0e09a872b298
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
4 years agoNetvirt troubleshooting improvements 44/83044/10
M Navaneethan [Mon, 15 Jul 2019 11:41:55 +0000 (17:11 +0530)]
Netvirt troubleshooting improvements

Change-Id: I0bec5b26a5fe2f68b1e735e06a60dd493a83e467
Signed-off-by: M Navaneethan <m.navaneethan@ericsson.com>
Signed-off-by: Ashik Alias <ashik.alias@ericsson.com>
4 years agoIDManager Exception in NAT 62/87262/4
Chetan Arakere Gowdru [Wed, 29 Jan 2020 12:54:11 +0000 (18:24 +0530)]
IDManager Exception in NAT

Description:
While allocating label for flat/vlan network case, external-network been
used as vpn and while deleting external-sunet used as vpn causing this
Exception. Changes done to use external-subnet as vpn while allocating
label.

JIRA : NETVIRT-1665

Signed-off-by: Chetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
Change-Id: I44b4ea44a8ff2d1e41fa2723a21e5f5f148d95b9
Signed-off-by: Chetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
4 years agoFix doc formatting issue 05/87405/1
Jamo Luhrsen [Mon, 3 Feb 2020 19:14:45 +0000 (11:14 -0800)]
Fix doc formatting issue

Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: Ifb941e5b2043bab1419e41699e2325bada504c85

4 years agoPort update with no security groups 38/86838/4
Shashidhar Raja [Fri, 10 Jan 2020 09:34:24 +0000 (15:04 +0530)]
Port update with no security groups

(a) Cache was updated after added ACLs were processed during port update.
This was casuing problems when port was updated from no security groups to
valid security groups; required flows were not getting added in remote
group tables. This issue is fixed by updating cache before processing of
added ACLs.

(b) Port update to no security groups was leaving stale flows in remote
group tables sometimes. This was because of cache update happening in
different thread than the thread which was processing deleted ACLs. This
issue is fixed by passing copy of required unchanged cache to the thread
which is processin deleted ACLs.

(c) Remote group flow was getting deleted even though it was part of other
rules (of the same or different SG) of the port. Validation is introduced
to check this condition now before remote group flow is deleted.

Change-Id: I15022652ddb36ade060c3c26149c5d68594e1593
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
4 years agoFloating IP failure in magnesium 23/87023/3
Chetan Arakere Gowdru [Fri, 17 Jan 2020 10:28:59 +0000 (15:58 +0530)]
Floating IP failure in magnesium

JIRA : NETVIRT-1662

Signed-off-by: Chetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
Change-Id: I11c5e2ce3bccd21ebf6e7f883759f3a06497a68c

4 years agoBump to odlparent-6.0.4/yangtools-4.0.6/mdsal-5.0.9 08/87008/2
Robert Varga [Thu, 16 Jan 2020 21:17:43 +0000 (22:17 +0100)]
Bump to odlparent-6.0.4/yangtools-4.0.6/mdsal-5.0.9

Pick up latest fixes and upgrades.

Change-Id: I07f64fa509994726248d69fe28bfcf81dc3cf2cb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoOptimize Elan flow table process 70/86470/3
Ning Zhang [Fri, 10 Jan 2020 02:00:46 +0000 (10:00 +0800)]
Optimize Elan flow table process

Optimize Elan Dmac flow sends process.

Change-Id: I23741a3bce83b647ed24d91e3d727a5a9aece51a
Signed-off-by: Ning Zhang <zhangninglc@inspur.com>
4 years agoCSIT FIX for ARP LEARNING TC FAILURE 21/86821/1
Karthikeyan Krishnan [Thu, 9 Jan 2020 09:45:05 +0000 (15:15 +0530)]
CSIT FIX for ARP LEARNING TC FAILURE

Issue:
======
New exceptions found: 1
[{'warnerr_list': [25, 38], 'lines': [u'2020-01-09T07:54:19,764 | ERROR |
jobcoordinator-main-task-17 | VpnInterfaceManager              | 370 -
org.opendaylight.netvirt.vpnmanager-impl - 0.10.0.SNAPSHOT | Failed to add
adjacency Adjacency{getAdjacencyType=LearntIp,
getIpAddress=192.168.10.110/32, getNextHopIpList=[10.10.10.6],
isPhysNetworkFunc=false, augmentation=[]} to vpn interface
54f54a7d-c251-4a43-a7a7-48ee14d12bad with dpnId 53790057429703',
u'java.lang.UnsupportedOperationException: null', u'\tat
com.google.common.collect.ImmutableCollection.removeAll(ImmutableCollection.java:283)
~[35:com.google.guava:27.1.0.jre]', u'\tat
org.opendaylight.netvirt.vpnmanager.VpnUtil.allocateRdForExtraRouteAndUpdateUsedRdsMap(VpnUtil.java:1560)
~[?:?]', u'\tat
org.opendaylight.netvirt.vpnmanager.VpnInterfaceManager.addNewAdjToVpnInterface(VpnInterfaceManager.java:1975)
~[?:?]', u'\tat
org.opendaylight.netvirt.vpnmanager.VpnInterfaceManager.lambda$updateVpnInstanceAdjChange$19(VpnInterfaceManager.java:1817)
~[?:?]', u'\tat

Solution:
=========
Have fixed the code to avoid the exception

Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
Change-Id: I01a194a27b217fd30e3bca8aeab7652cb05ca06c

4 years agoCSIT L3VPN TC Failure FIX 06/86806/4
Karthikeyan Krishnan [Wed, 8 Jan 2020 12:46:57 +0000 (18:16 +0530)]
CSIT L3VPN TC Failure FIX

Issue: NETVIRT-1637

CSIT ISSUE:
============
L3VPN CSIT failure post MRI actviity

Exception Issue:
================
VpnInterfaceManager              | 370 -
org.opendaylight.netvirt.vpnmanager-impl - 0.10.0.SNAPSHOT | Failed to add
adjacency Adjacency{getAdjacencyType=LearntIp,
getIpAddress=192.168.10.110/32, getNextHopIpList=[10.10.10.10],
isPhysNetworkFunc=false, augmentation=[]} to vpn interface
b8ed74b7-21ad-4c1f-8cfa-3e9e8eb08a8e with dpnId 13255991979830',
u'java.lang.UnsupportedOperationException: null', u'\tat
com.google.common.collect.ImmutableCollection.removeAll(ImmutableCollection.java:283)
~[35:com.google.guava:27.1.0.jre]', u'\tat
org.opendaylight.netvirt.vpnmanager.VpnUtil
.allocateRdForExtraRouteAndUpdateUsedRdsMap(VpnUtil.java:1560)
~[?:?]',

CSIT Solution:
==============
As part of this fix we have properly handled the
vpn-interface-op-data cleanup for router to BGPVPN
swap case.

Since existing code it was not properly handled the validation for
vpn-interface-op-data clean-up. Hence when router-intstance
is associated/disassociated with BGPVPN corresponding
data store entries are not getting cleaned-up.

Exception Solution:
===================
As part of this fix we have done proper fix for UnsupportedOperation
Exception from VpnManager as well.

Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
Change-Id: I57a0d774c8cf8bf381337729603523a70aa7cf4e

4 years agoELAN Reboot fixes and Flow ID change 63/84763/7
Amitesh Soni [Wed, 4 Dec 2019 10:17:42 +0000 (15:47 +0530)]
ELAN Reboot fixes and Flow ID change

1) Table 51 MAC issue after CSC reboot
Description: This is to avoid stale entries being created.
The solution is to construct a flow key with ELAN tag and
MAC address, which would update the same flow after MAC movement.

2) VM Migration Table 51 stale entry
Description: Issue is observed when ElanLearnVpnVip MIP MAC
and Interface MAC are same. During migration, ElanLearntVpnVipToPortListener
remove deletes MAC entry from ElanInterfaceForwardingEntries,
which is referred by ElanInterfaceStateChangeListener remove workflow,
which is started after the ElanInterfaceForwardingEntries thread completes
its course of action. Both threads have an action to delete DMAC flow entries
but the first thread refers InterfaceManager for InterfaceInfo
which returns null, hence skips the delete DMAC workflow, but deletes the
MAC entry. Other thread refers MAC entry, which has been deleted
by first thread, hence this too skips delete workflow.
The solution is to delete MAC entry in first thread only if InterfaceInfo
is not null so that second thread can delete DMAC entry as well as delete
MAC entry during its course of action.

Signed-off-by: Amitesh Soni <amitesh.soni@ericsson.com>
Change-Id: I9a2b72e0d70a2edf9072c77fc35314e1b7a2c46d

4 years agoNETVIRT-1643: Added checkes to resolve NPE 75/86775/4
Shashidhar Raja [Tue, 7 Jan 2020 07:11:07 +0000 (12:41 +0530)]
NETVIRT-1643: Added checkes to resolve NPE

Change-Id: I728a4757d10bbf6465409181f7dd2561bd176821
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
4 years agoservice restart for l2gw 62/84962/6
manojna v [Mon, 7 Oct 2019 09:47:56 +0000 (15:17 +0530)]
service restart for l2gw

Introducing service restart feature for l2gw. We can restart
the whole l2gw service, we can restart specific l2gw instances
by specifying l2gw ids, we can also restart services specific
to l2gw connections instances.

Change-Id: Id00190e808bf36dff1810d1a3d8f028c4aabb24c
Signed-off-by: manojna v <manojna.vijayakrishna@ericsson.com>
4 years agoNETVIRT-1563: karaf cmd display in proper format 57/86557/2
Shashidhar Raja [Tue, 24 Dec 2019 08:18:42 +0000 (13:48 +0530)]
NETVIRT-1563: karaf cmd display in proper format

Updated to show display output in proper format

Change-Id: I1f29dcd7bb4ba4daeda307a714c26c6ff0bcb63f
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
4 years agoOptimize issues in acl flow table class 43/85743/3
Ning Zhang [Tue, 12 Nov 2019 09:10:43 +0000 (17:10 +0800)]
Optimize issues in acl flow table class

1.Delete method programAcl() in AbstractAclServiceImpl.java
2.String concatenation does not require the toString method

Change-Id: I3579c52e95688a1fd02c3c3fbb491b2809d318be
Signed-off-by: Ning Zhang <zhangninglc@inspur.com>
4 years agoNAT FloatingIP CSIT Failure 78/86078/4
xcheara [Sat, 30 Nov 2019 13:03:35 +0000 (18:33 +0530)]
NAT FloatingIP CSIT Failure

Signed-off-by: xcheara <chetan.arakere@altencalsoftlabs.com>
Change-Id: I1416b8494266b9f3cc60937906107546e3bb61f6
Signed-off-by: xcheara <chetan.arakere@altencalsoftlabs.com>
4 years agoebgp yang changes 39/86039/8
Abhinav Gupta [Thu, 28 Nov 2019 09:26:19 +0000 (14:56 +0530)]
ebgp yang changes

Descrption:
Moving list to container in BGP yang.
Reading a list is not allowed in MDSAL. so moving the list to a
container.

Signed-off-by: Abhinav Gupta <abhinav.gupta@ericsson.com>
Change-Id: Ia646295db8350f5f4b27b009bb6308c4d883a0e2
Signed-off-by: zhmxman <manjunath.hethur@gmail.com>
4 years agoVM creation fails with failed to allocate the nw 23/83023/9
Karthikeyan Krishnan [Fri, 12 Jul 2019 06:55:46 +0000 (12:25 +0530)]
VM creation fails with failed to allocate the nw

Issue:
======
VM creation fails with failed to allocate the
network error

Solution:
=========
Jstack output showed 8 L3 group installation DJC jobs on 8 CPUs waiting
indefinitely
for the group to get written on the switch.
This fix introduces a timed wait on the future so that other operations
can continue after the TimeOut and finally the DJC Thread can be released.

Change-Id: I6ffd61c7815bf5d82831c65064fbb1f749532b96
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
4 years agoVPN flows in Table 21 pointing to wrong DCGW 21/83021/12
Karthikeyan Krishnan [Fri, 12 Jul 2019 06:17:26 +0000 (11:47 +0530)]
VPN flows in Table 21 pointing to wrong DCGW

Issue:
=====
VPN flows in Table 21 pointing to wrong DCGW and traffic fails for
affected flows

RCA:
=====
Observed conflicting modifications on the same flow when bgp driven and
vpn-footprint driven logic executed at the same time.
This fix introduces the DJC retry approach for vpn-footprint driven flow
programming logic.

Solution:
========
Have fixed the code logic to point the right DC-GW
output action for BGP advertised routes.

Change-Id: I54838ce701b1be6126b787ba08b712222463a71d
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
4 years agoVPN Imported data traffic is failed 72/83172/8
Karthikeyan Krishnan [Fri, 19 Jul 2019 10:17:17 +0000 (15:47 +0530)]
VPN Imported data traffic is failed

Issue Description:
==================
All VPN imported data traffic is getting failed
in within same compute VMs.
While fetching SRC and DST MAC addresses for
VPN Imported routes, it uses imported VPN RD
instead of parentVpnRd.

Solution:
=========
Starting from Sfi_Oxygen onwards, Vpn-interface-Op-Data
key is RD + VPN Instance Name. So for this design
while fetching the SRC and DST MAC addresses for
VPN imported routes in Vpn-Interface-Op-data, it should
use parentVPN RD for all imported routes.

Change-Id: I1e1aac0222b1b308d04fa401b07de1e82debc672
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
4 years agoDepend on immutables.org annotations only 80/86380/3
Robert Varga [Thu, 12 Dec 2019 07:08:42 +0000 (08:08 +0100)]
Depend on immutables.org annotations only

Update dependency to reflect new way of integration with build.

Change-Id: Icdb2db6663ad04ee5a31f7943e8051107c4fe0ea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent/yangtools/mdsal to 6.0.3/4.0.3/5.0.6 79/86379/3
Robert Varga [Thu, 12 Dec 2019 07:08:11 +0000 (08:08 +0100)]
Bump odlparent/yangtools/mdsal to 6.0.3/4.0.3/5.0.6

Pick up the latest upgrades and fixes.

Change-Id: I941173333284b10ac068aef87269392c2a355540
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agovpnmanager: use datastore-constrained transactions 82/81682/6
Stephen Kitt [Tue, 16 Apr 2019 09:52:04 +0000 (11:52 +0200)]
vpnmanager: use datastore-constrained transactions

Change-Id: I47afadf4bdefb7357ea99a8c3f643e9df32121d8
Signed-off-by: Stephen Kitt <skitt@redhat.com>
4 years agoEnforce datastore-contrained transactions 86/73686/10
Stephen Kitt [Tue, 3 Jul 2018 09:05:56 +0000 (11:05 +0200)]
Enforce datastore-contrained transactions

This ensures that new uses of non-datastore-contrained transactions
(using the transaction manager) can’t be introduced. The remaining
uses in fibmanager and vpnmanager are marked explicitly.

Change-Id: I81aa5fe8ae6d3756a4dc11c0c1a0e61c09dc9650
Signed-off-by: Stephen Kitt <skitt@redhat.com>
4 years agoneutronvpn: use datastore-constrained transactions 38/86038/2
Stephen Kitt [Thu, 28 Nov 2019 09:04:50 +0000 (10:04 +0100)]
neutronvpn: use datastore-constrained transactions

Change-Id: I61c916a92eebd38d089d245dbc193248fa9e9b89
Signed-off-by: Stephen Kitt <skitt@redhat.com>
4 years agoMinor changes in Filter Equals table. 33/84033/4
Amitesh Soni [Mon, 9 Dec 2019 07:29:25 +0000 (12:59 +0530)]
Minor changes in Filter Equals table.

Flow priority changed in setupFilterEqualsTable method.

Removed extra (not required) parameters for removeFlow.

Signed-off-by: Amitesh Soni <amitesh.soni@ericsson.com>
Change-Id: I54c349196340be6824ae230970f626c0e794a369

4 years agoNETVIRT-1641 neutronvpn:networkMaps update failed when add the second subnet under... 05/86305/1
Ashik Alias [Mon, 9 Dec 2019 10:20:48 +0000 (15:50 +0530)]
NETVIRT-1641 neutronvpn:networkMaps update failed when add the second subnet under network

we were trying to update the subnet list within builder directly instead
of using a new reference.

Change-Id: If372124b2eda0cf26d35e0b7246b1b64d3fc455e
Signed-off-by: Ashik Alias <ashik.alias@ericsson.com>
4 years agoDecoupling SFC from NetVirt 19/85819/5
Abhinav Gupta [Mon, 18 Nov 2019 10:54:31 +0000 (16:24 +0530)]
Decoupling SFC from NetVirt

Change-Id: I3583b9ab4d06c29f96cd3eb151cbe21fce6b9d4a
Signed-off-by: Abhinav Gupta <abhinav.gupta@ericsson.com>
4 years agoNETVIRT-1637 CSIT failure 00/86100/8
Ashik Alias [Mon, 2 Dec 2019 11:21:36 +0000 (16:51 +0530)]
NETVIRT-1637 CSIT failure

   logging enhancements

Change-Id: If546c19be2a3d685f958e0fd7f4cd202671758aa
Signed-off-by: Ashik Alias <ashik.alias@ericsson.com>
4 years agoElanInstance DS not populated properly 93/84093/2
Amitesh Soni [Fri, 30 Aug 2019 10:01:44 +0000 (15:31 +0530)]
ElanInstance DS not populated properly

While debugging "VMs cannot refresh IPs via DHCP",
it was seen that in "updateOperationalDataStore" method,
we were not writing to ElanInstance DS properly, due to
which, ElanInstance DS was having certain fields null and
eventually not programming table 36 and table 52 (for remote
unknown DMAC flow).

Now, fixing this issue to populate ElanInstance DS properly.

Change-Id: If2132ae191b5694074a272fc4baf37757da6f88c
Signed-off-by: Amitesh Soni <amitesh.soni@ericsson.com>
4 years agoRuntime exception handling in addNewAdjToVpnInterface method 23/83223/14
Amitesh Soni [Fri, 26 Jul 2019 07:35:15 +0000 (13:05 +0530)]
Runtime exception handling in addNewAdjToVpnInterface method

Added try-catch block for runtime exception handling for
addNewAdjToVpnInterface in VpnInterfaceManager.java

Also, corrected the minor spelling mistake in a log statement
in getVpnInterfaceOpDataEntryAdjacencyIdentifier in VpnUtil.java

Change-Id: Iefa48b245fc38730a3e1535d1e9adb2d3ab870cb
Signed-off-by: Amitesh Soni <amitesh.soni@ericsson.com>
4 years agoBgpRouter code enhancements 31/86031/4
Loshmitha [Wed, 27 Nov 2019 12:18:42 +0000 (17:48 +0530)]
BgpRouter code enhancements
Router code enhancements have been added

JIRA: NETVIRT-1645

Change-Id: Ie9a6348e7549c0f774272024bcfc1863b2abbc63
Signed-off-by: Loshmitha <loshmitha@ericsson.com>
4 years agoBGPVPN delete is throwing NPE 88/83188/9
Karthikeyan Krishnan [Mon, 22 Jul 2019 06:55:06 +0000 (12:25 +0530)]
BGPVPN delete is throwing NPE

Issue Description:
=================
BGPVPN not getting Deleted and remaining stale due to the
exception[0] from CSC

[0]
<h3>Caused by:</h3><pre>java.lang.NullPointerException
at
org.opendaylight.netvirt.neutronvpn.NeutronvpnManager.removeVpn(NeutronvpnManager.java:2191)
at
org.opendaylight.netvirt.neutronvpn.NeutronvpnManager.deleteL3VPN(NeutronvpnManager.java:1443)

Solution:
=========
If BGPVPN instance has already disassociated from
Network(s), later user is trying to delete the BGPVPN
instance using REST API call, we should handle
proper null check to avoid the exceptions from
NeutronVpnManager. Since vpnmaps querying is causing
this Nullpointer Exception

Change-Id: I17037a52862cf851985931eff94a88bcfc951476
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
4 years agoFix check for pending UUID 91/85991/2
Robert Varga [Tue, 26 Nov 2019 18:24:25 +0000 (19:24 +0100)]
Fix check for pending UUID

The check is wrong here, as it will evaluate to true if original
is null and update has "PENDING" deviceId -- which is definitely not
inteded, as it will invariantly blow up on Uuid instantiation.

Change-Id: I1aedaf6279df2c442c4d5b35b328d86c42a00b86
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoStale ExternalIps in vpn-instance-op-data 76/84276/8
Chetan Arakere Gowdru [Mon, 9 Sep 2019 11:22:13 +0000 (16:52 +0530)]
Stale ExternalIps in vpn-instance-op-data

Description:
Becuase of stale SNAT ExternalIPs peristed in vpn-instance-op-data DS,
the InternetVPN been kept in pending_delete state which resulted in
stale table=21 flows post clean-up.

Changes are done to handle removal of this stale entries from
vpn-instance-op-data DS for NAT Ips.

Change-Id: Iede3ca51201b9d6ee4cc2caa1dcecd40b08860a3
Signed-off-by: Chetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
4 years agoEnhancements in BGP module 55/85955/3
Loshmitha [Mon, 25 Nov 2019 09:29:03 +0000 (14:59 +0530)]
Enhancements in BGP module
Error messages and other enhancements have been added

JIRA: NETVIRT-1644

Change-Id: Icbdf7a8bf8785765dc50de9999a67dcbeba7e166
Signed-off-by: Loshmitha <loshmitha@ericsson.com>
4 years agoUnsupport operation exception in NeutronvpnManager.java 24/85924/7
Ning Zhang [Mon, 25 Nov 2019 07:31:43 +0000 (15:31 +0800)]
Unsupport operation exception in NeutronvpnManager.java

1.Unsupported operation exception handling;
2.Do not use the toString() when printing logs;

Change-Id: Ifb1512a7aaa2b68595d56ee5b41b26ac3edc4a8d
Signed-off-by: Ning Zhang <zhangninglc@inspur.com>
4 years agoStale table 21 and table 220 entries 94/83594/8
Ravindra Thakur [Tue, 11 Jun 2019 10:11:37 +0000 (15:41 +0530)]
Stale table 21 and table 220 entries

RC: getPrimaryRd() with vpnInstance is used is delete path.
which does not return the correct RD in delete path.

Fix: use getVpnRd() with vpnName  for vpn op data lookup.

The variant with vpnName as lookup key uses vpn-instance-to-vpn-id
DS to read the primary RD which gives correct primary RD value.

Change-Id: I27467be7f0ea5eb6a05e5a5153887f6bbb06bac0
Signed-off-by: Ravindra Thakur <ravindra.nath.thakur@ericsson.com>
Signed-off-by: Arun Sharma <arun.e.sharma@ericsson.com>
4 years agoDS READ Optimization in NAT 22/83022/8
Chetan Arakere Gowdru [Thu, 11 Jul 2019 13:15:48 +0000 (18:45 +0530)]
DS READ Optimization in NAT

Description:
Following Changes done.
1) Passing certain attributes(external-network,ext-routers, external-vpn)
as parameter to subsequent methods to avoid DS read operation
to retrieve the same parameters again.

JIRA: NETVIRT-1612
Change-Id: I72c60584eff89c4ac258f0d5176c20892dbbc195
Signed-off-by: Chetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
Signed-off-by: xcheara <chetan.arakere@altencalsoftlabs.com>
4 years agoNeutronVPN: Improve txn handling and fix memory leaks 53/83053/7
Ashik Alias [Tue, 16 Jul 2019 06:33:44 +0000 (12:03 +0530)]
NeutronVPN: Improve txn handling and fix memory leaks

Improve transaction handling and fix memory leaks for NeutronVPN.
This is important to minimize no. of active threads in the system as well as
provide better error handling in case of failures.

Change-Id: I6de9fb8f08a731a2f697aa04aa73cbd915021db8
Signed-off-by: Ashik Alias <ashik.alias@ericsson.com>
4 years agoBFD logging 42/85342/2
Loshmitha [Wed, 23 Oct 2019 09:17:17 +0000 (14:47 +0530)]
BFD logging
Peer Up and Peer Down events are added to the history command

JIRA: NETVIRT-1632

Change-Id: I32fdf55185ee96ba1fb0484aa09c384c2779a3da
Signed-off-by: Loshmitha <loshmitha@ericsson.com>
4 years agoRemoving redundant extra-route delete 46/83246/8
Amitesh Soni [Thu, 25 Jul 2019 09:00:52 +0000 (14:30 +0530)]
Removing redundant extra-route delete

Removing redundant delete of extra-route
from delAdjFromVpnInterface method since
it is already being taken care by remove
and update of FIB.

Change-Id: I8ee6255c60557d4121dcc0de8c56352ba009a49e
Signed-off-by: Amitesh Soni <amitesh.soni@ericsson.com>
4 years agoDowngrate aggregator's javadoc plugin 22/85922/2
Abhinav Gupta [Thu, 21 Nov 2019 07:18:35 +0000 (12:48 +0530)]
Downgrate aggregator's javadoc plugin

javadoc-verify/merge jobs are affected by some bug in maven-javadoc-plugin
-- it would filter iana-if-type dependency, leading to a a failure in
javadoc:aggregate.

Signed-off-by: Abhinav Gupta <abhinav.gupta@ericsson.com>
Change-Id: Idad42d043d4eeaed744c54262035ba990eedabad

4 years agoManage Acl For Existing TrafficTable Throwing Exception 58/84558/3
Ning Zhang [Fri, 20 Sep 2019 09:03:18 +0000 (17:03 +0800)]
Manage Acl For Existing TrafficTable Throwing Exception

Issue Description:
=================
Elan id may be null, calling the intValue() must throws NPE.

ERROR:
java.lang.NullPointerException: null
    at org.opendaylight.netvirt.aclservice.utils.AclServiceUtils.createCtMarkInstructionForNewState(AclServiceUtils.java:1284)
    at org.opendaylight.netvirt.aclservice.AbstractAclServiceImpl.programAclForExistingTrafficTable(AbstractAclServiceImpl.java:481)

Solution:
================
Determine that the Elan id cannot be null before define ActionNxConntrack

Change-Id: I48a67f75f8ef73c1e44babc324157b9a85560512
Signed-off-by: Ning Zhang <zhangninglc@inspur.com>
4 years agoNeutronVPN: Improve txn handling and fix memory leaks - Part 2 88/83588/6
Ashik Alias [Tue, 13 Aug 2019 08:12:46 +0000 (13:42 +0530)]
NeutronVPN: Improve txn handling and fix memory leaks - Part 2

Improve transaction handling and fix memory leaks for NeutronVPN. This is
important to minimize no. of active threads in the system as well as provide
better error handling in case of failures.

Change-Id: I5c258199a7eee6f5dcc80da150187d05fe324fa1
Signed-off-by: Ashik Alias <ashik.alias@ericsson.com>
4 years agoUnable to create L3VPN instance 74/83074/4
Ashik Alias [Wed, 17 Jul 2019 06:44:52 +0000 (12:14 +0530)]
Unable to create L3VPN instance

Timing issue that is causing already removed data to be written again.

Change-Id: I926f6d10755980a102a154451436bdd18fb1c5fe
Signed-off-by: Ashik Alias <ashik.alias@ericsson.com>
4 years agoFix to suppress severity 55/83055/4
M Navaneethan [Tue, 16 Jul 2019 07:47:55 +0000 (13:17 +0530)]
Fix to suppress severity

Change-Id: I650e01ea92b5ee06c4fef3b5408ed6105269d7c5
Signed-off-by: M Navaneethan <m.navaneethan@ericsson.com>
4 years agoAdding Logger for debugging. 71/84171/3
Amitesh Soni [Fri, 15 Nov 2019 09:52:51 +0000 (15:22 +0530)]
Adding Logger for debugging.

Signed-off-by: Amitesh Soni <amitesh.soni@ericsson.com>
Change-Id: I15a62d9b4476bf9dc034d70b7bffc5ed9668a562

4 years agoFix Acl.getAccessListEntries() NPE 14/85614/5
Robert Varga [Fri, 1 Nov 2019 12:23:49 +0000 (13:23 +0100)]
Fix Acl.getAccessListEntries() NPE

This reworks interactions with Acl.getAccessListEntries(), so that
it's non-presence is uniformly treated in all cases. This fixes at
least:

java.lang.NullPointerException: null
at org.opendaylight.netvirt.aclservice.listeners.AclEventListener.remove(AclEventListener.java:110) ~[?:?]
at org.opendaylight.netvirt.aclservice.listeners.AclEventListener.remove(AclEventListener.java:50) ~[?:?]
at org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase$DataTreeChangeHandler.run(AsyncDataTreeChangeListenerBase.java:158) ~[274:org.opendaylight.genius.mdsalutil-api:0.7.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]

While also consilading duplicate code.

JIRA: NETVIRT-1636
Change-Id: Ifc33c63aa41c0fb75453deeee2093906c2ad5e95
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 6a1bd2bd02d4612c8f468d179d5cb0dc795f1d84)

4 years agoOptimize method in AclEventListener.java 60/85760/3
Ning Zhang [Fri, 15 Nov 2019 07:21:27 +0000 (15:21 +0800)]
Optimize method in AclEventListener.java

Optimize method getDeletedAceList(), return not null collection

Change-Id: I36a954af222c22100bdd679c8f1c0bdd167f521d
Signed-off-by: Ning Zhang <zhangninglc@inspur.com>
4 years agoRedundant Uint32 type conversions 61/85761/1
Ning Zhang [Thu, 14 Nov 2019 09:43:15 +0000 (17:43 +0800)]
Redundant Uint32 type conversions

No need to change type Uint32 to itself.

Change-Id: Icc9f7bc01c5ad69075ff852ba6cb12ece423ade8
Signed-off-by: Ning Zhang <zhangninglc@inspur.com>
4 years agoCheck network presence 10/85710/3
Robert Varga [Fri, 8 Nov 2019 11:49:43 +0000 (12:49 +0100)]
Check network presence

In case we end up with an UUID for which we cannot find a network,
we end up with this splat:

java.lang.NullPointerException: null
        at org.opendaylight.netvirt.neutronvpn.NeutronvpnUtils.getIsExternal(NeutronvpnUtils.java:988) ~[?:?]
        at org.opendaylight.netvirt.neutronvpn.NeutronvpnUtils.getVpnForRouter(NeutronvpnUtils.java:291) ~[?:?]
        at org.opendaylight.netvirt.neutronvpn.NeutronvpnManager.createL3InternalVpn(NeutronvpnManager.java:1203) ~[?:?]
        at org.opendaylight.netvirt.neutronvpn.NeutronRouterChangeListener.add(NeutronRouterChangeListener.java:84) ~[?:?]
        at org.opendaylight.netvirt.neutronvpn.NeutronRouterChangeListener.add(NeutronRouterChangeListener.java:36) ~[?:?]
        at org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase$DataTreeChangeHandler.run(AsyncDataTreeChangeListenerBase.java:171) ~[274:org.opendaylight.genius.mdsalutil-api:0.7.1]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?]

This adds appropriate annotations so that callers of getNetwork()
are flagged when they do not handle nulls. Fixes the reported offender
by moving the checking code into a utility class.

JIRA: NETVIRT-1636
Change-Id: I8872699a1bbf56a55977a9f1e8a0d97b1ff45f94
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit f82e3f86775b7310369aca1ee2b00222615333d2)

4 years agoFix another VpnSubnetRouteHandler NPE source 09/85709/3
Robert Varga [Fri, 8 Nov 2019 11:42:52 +0000 (12:42 +0100)]
Fix another VpnSubnetRouteHandler NPE source

java.lang.NullPointerException: null
        at org.opendaylight.netvirt.vpnmanager.VpnSubnetRouteHandler.electNewDpnForSubnetRoute(VpnSubnetRouteHandler.java:988) ~[?:?]
        at org.opendaylight.netvirt.vpnmanager.VpnSubnetRouteHandler.onInterfaceDown(VpnSubnetRouteHandler.java:693) ~[?:?]
        at org.opendaylight.netvirt.vpnmanager.SubnetRouteInterfaceStateChangeListener.lambda$remove$1(SubnetRouteInterfaceStateChangeListener.java:184) ~[?:?]
        at org.opendaylight.infrautils.utils.ClassLoaders.lambda$call$2(ClassLoaders.java:39) ~[293:org.opendaylight.infrautils.util:1.6.1]
        at org.opendaylight.infrautils.utils.ClassLoaders.call(ClassLoaders.java:47) ~[293:org.opendaylight.infrautils.util:1.6.1]
        at org.opendaylight.infrautils.utils.ClassLoaders.call(ClassLoaders.java:39) ~[293:org.opendaylight.infrautils.util:1.6.1]
        at org.opendaylight.infrautils.jobcoordinator.internal.JobCoordinatorImpl$MainTask.runWithUncheckedExceptionLogging(JobCoordinatorImpl.java:398) ~[?:?]
        at org.opendaylight.infrautils.utils.concurrent.LoggingUncaughtThreadDeathContextRunnable.run(LoggingUncaughtThreadDeathContextRunnable.java:60) ~[293:org.opendaylight.infrautils.util:1.6.1]
        at org.opendaylight.infrautils.utils.ClassLoaders.lambda$run$0(ClassLoaders.java:26) ~[293:org.opendaylight.infrautils.util:1.6.1]
        at org.opendaylight.infrautils.utils.ClassLoaders.call(ClassLoaders.java:47) ~[293:org.opendaylight.infrautils.util:1.6.1]
        at org.opendaylight.infrautils.utils.ClassLoaders.run(ClassLoaders.java:25) ~[293:org.opendaylight.infrautils.util:1.6.1]
        at org.opendaylight.infrautils.utils.ClassLoaders.lambda$wrap$3(ClassLoaders.java:54) ~[293:org.opendaylight.infrautils.util:1.6.1]
        at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402) [?:?]
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:?]
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:?]
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:?]
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:?]

This indicates that we do not need to have entries on a downed
interface, thus fixing it up.

JIRA: NETVIRT-1636
Change-Id: I181a6b5f9f2618ff5be1bc254e5873f45f6f6768
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 6d7370b369d15affb039fc09664283817675966d)

4 years agoFailed to update qos when port cannot find network 94/85494/2
Ning Zhang [Fri, 1 Nov 2019 15:10:33 +0000 (23:10 +0800)]
Failed to update qos when port cannot find network

Issue Description:
Could not get network by port's network id, so we cannot use the network to get qos.
java.lang.NullPointerException: null
        at org.opendaylight.netvirt.qosservice.QosNeutronUtils.getQosPolicy(QosNeutronUtils.java:811)
        at org.opendaylight.netvirt.qosservice.QosNeutronPortChangeListener.checkForPortIpAddressUpdate(QosNeutronPortChangeListener.java:123)

Signed-off-by: Ning Zhang <zhangninglc@inspur.com>
Change-Id: Id3df070ebbdfd90952e9cc8b5d021803a2911dd7

4 years agoBump to odlparent-6.0.1/yangtools-4.0.2/mdsal-5.0.4 37/85637/4
Robert Varga [Wed, 6 Nov 2019 16:38:56 +0000 (17:38 +0100)]
Bump to odlparent-6.0.1/yangtools-4.0.2/mdsal-5.0.4

This picks up latest upgrades and fixes.

Change-Id: I8db358b0af81394a561071d98bffea168dda47cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAvoid full elan-interface read for gre/vxlan ext-network 80/84280/4
Chetan Arakere Gowdru [Mon, 9 Sep 2019 12:07:44 +0000 (17:37 +0530)]
Avoid full elan-interface read for gre/vxlan ext-network

Description:
To handle flat/vlan provider type use-cases, when the subnet is created,
a NAT listener used to query the full elan-interface and try to identify
specific elan-interfaces associated with physical interfaces.

THis call is not required for every subnet creation and also for
gre/vxlan provider type networks.

Check been added to prevent unnecessary getAllElanInterface call to
prevent bulk read.

Change-Id: Id91797c047e0a45380d1cd0cddf963228fc645ac
Signed-off-by: Chetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
4 years agoOptimize the method in AclServiceUtils.java 90/85690/2
Ning Zhang [Thu, 7 Nov 2019 08:29:38 +0000 (16:29 +0800)]
Optimize the method in AclServiceUtils.java

1.Optimize method getUpdatedAclList(), And the call method.
2.Optimize method getUpdatedAllowedAddressPairs(), return not null
collection.

Change-Id: I7ca751a76b098289974d842faae3f1b3bd12004f
Signed-off-by: Ning Zhang <zhangninglc@inspur.com>
4 years agoConcentrate InstanceIdentifier handling in NeutronvpnUtils 93/85493/3
Robert Varga [Fri, 1 Nov 2019 14:39:15 +0000 (15:39 +0100)]
Concentrate InstanceIdentifier handling in NeutronvpnUtils

InstanceIdentifier.child() can be used to create child identifiers,
with some reuse of hashCodes and similar. Cache are baseline identifiers
and derive keys from them.

Change-Id: I093aa563381f1da84ab098a0e90b2d39bb6c41ae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoOpenDaylight used 8181 to listen for REST calls 83/84183/2
Ning Zhang [Wed, 4 Sep 2019 02:35:27 +0000 (10:35 +0800)]
OpenDaylight used 8181 to listen for REST calls

Issue Description:
=================
OpenDaylight used port 8181 to listen for Rest calls instead of 8080.

Solution:
=========
Replace port 8080 with port 8181 to listen for Rest calls;

Signed-off-by: Ning Zhang <zhangninglc@inspur.com>
Change-Id: If75080d71f5c188ecb079f6d08c3218980021c8e

4 years agoStale Floating IP entry in dpn-op-elements 77/84277/11
Chetan Arakere Gowdru [Mon, 9 Sep 2019 11:44:19 +0000 (17:14 +0530)]
Stale Floating IP entry in dpn-op-elements

Problem Description:
It's been oberserved that the VM's neutron Port is
deleted first before floating-ip with which it associated. As a result,
when floating-ip-info delete event is triggered, the ifmgr RPC query to
get the DPNID first check for ietf-interface config (which is already
cleared) and return with empty DpnID. As a result, the flow for clear
the DNAT related flows and withdrawal of Floating IP route from
vpn-instance-op-data didn't succeeded.

Solution:
Change are to query the interface-state Oper DS to get the DPNID instead
of ifmmgr RPC call.

Change-Id: Ic12746e73e62d62b8310d391e51e42d376b465e4
Signed-off-by: Chetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
4 years agoImprove NeutronVpnUtils.getIsExternal() 92/85492/2
Robert Varga [Fri, 1 Nov 2019 14:07:48 +0000 (15:07 +0100)]
Improve NeutronVpnUtils.getIsExternal()

This eliminates one sift through augmentations, improving performance
a bit.

Change-Id: I39ff594ffc7561d04201282e4fbf812377f9c614
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoEliminate NeutronvpnUtils.isNetworkOfType() 90/85490/2
Robert Varga [Fri, 1 Nov 2019 13:57:03 +0000 (14:57 +0100)]
Eliminate NeutronvpnUtils.isNetworkOfType()

This method is used from only a single caller, which is checking
the same augmentation. Inline the check into the caller, making
sure we look up the augmentation only once -- thus speeding up
the NetworkTypeFlat case.

Change-Id: Ia3e767b8582af6ee61ed84ed13d0d8627a0eaa69
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix VpnSubnetRouteHandler handling of getSubnetToDpn() 88/85488/2
Robert Varga [Fri, 1 Nov 2019 13:39:02 +0000 (14:39 +0100)]
Fix VpnSubnetRouteHandler handling of getSubnetToDpn()

List<SubnetToDpn> may be null here:

java.lang.NullPointerException: null
        at org.opendaylight.netvirt.vpnmanager.VpnSubnetRouteHandler.onInterfaceUp(VpnSubnetRouteHandler.java:623) ~[?:?]
        at org.opendaylight.netvirt.vpnmanager.SubnetRouteInterfaceStateChangeListener.lambda$add$0(SubnetRouteInterfaceStateChangeListener.java:115) ~[?:?]
        at org.opendaylight.infrautils.utils.ClassLoaders.lambda$call$2(ClassLoaders.java:39) ~[293:org.opendaylight.infrautils.util:1.6.1]
        at org.opendaylight.infrautils.utils.ClassLoaders.call(ClassLoaders.java:47) ~[293:org.opendaylight.infrautils.util:1.6.1]
        at org.opendaylight.infrautils.utils.ClassLoaders.call(ClassLoaders.java:39) ~[293:org.opendaylight.infrautils.util:1.6.1]
        at org.opendaylight.infrautils.jobcoordinator.internal.JobCoordinatorImpl$MainTask.runWithUncheckedExceptionLogging(JobCoordinatorImpl.java:398) ~[?:?]
        at org.opendaylight.infrautils.utils.concurrent.LoggingUncaughtThreadDeathContextRunnable.run(LoggingUncaughtThreadDeathContextRunnable.java:60) ~[293:org.opendaylight.infrautils.util:1.6.1]
        at org.opendaylight.infrautils.utils.ClassLoaders.lambda$run$0(ClassLoaders.java:26) ~[293:org.opendaylight.infrautils.util:1.6.1]
        at org.opendaylight.infrautils.utils.ClassLoaders.call(ClassLoaders.java:47) ~[293:org.opendaylight.infrautils.util:1.6.1]
        at org.opendaylight.infrautils.utils.ClassLoaders.run(ClassLoaders.java:25) ~[293:org.opendaylight.infrautils.util:1.6.1]
        at org.opendaylight.infrautils.utils.ClassLoaders.lambda$wrap$3(ClassLoaders.java:54) ~[293:org.opendaylight.infrautils.util:1.6.1]
        at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402) [?:?]
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:?]
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:?]
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:?]
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:?]

This patch fixes it up in a slighly different way to what
Magnesium did.

JIRA: NETVIRT-1636
Change-Id: Id075318b144ff34e680e16bfb426aaaa4fbe6af9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSpeed up NeutronvpnUtils.isNetworkTypeSupported() 89/85489/1
Robert Varga [Fri, 1 Nov 2019 13:48:51 +0000 (14:48 +0100)]
Speed up NeutronvpnUtils.isNetworkTypeSupported()

Make SUPPORTED_NETWORK_TYPES an ImmutableSet and eliminate a
superfluous null check.

Change-Id: I60c5ca22e2560472690eab6fdfb3873d1146c237
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUnsupported operation exception handling 79/85179/35
xcheara [Tue, 15 Oct 2019 12:23:40 +0000 (17:53 +0530)]
Unsupported operation exception handling

Description:
Fixed in elan, dhcp, ipv6,qos observed issues in CSIT.

Signed-off-by: xcheara <chetan.arakere@altencalsoftlabs.com>
Change-Id: I22048de2d9ea3ea4353ae35df76bb0b76a4e977f
Signed-off-by: xcheara <chetan.arakere@altencalsoftlabs.com>
Signed-off-by: Chetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
4 years agoRemove COE Dependencies 75/85375/2
Faseela K [Thu, 24 Oct 2019 16:51:43 +0000 (22:21 +0530)]
Remove COE Dependencies

As COE is moving to self-managed project, netvirt should
remove all its dependencies to COE

Signed-off-by: Faseela K <k.faseela@gmail.com>
Change-Id: I04fb3943d5464b56d861a7c9e2aef49a3c725449

4 years agoUse ActionableResourceImpl for setter access 11/85411/1
Robert Varga [Mon, 28 Oct 2019 13:42:24 +0000 (14:42 +0100)]
Use ActionableResourceImpl for setter access

We really do not allow ActionableResource to be modifiable once
built. This uses ActionableResourceImpl instead of the bare interface.

JIRA: GENIUS-281
Change-Id: I35a475b0b3936b303e5e9542216b3d7e2a793ab3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUpdate docs header to Magnesium in the master 13/83813/2
Anushka Bhandari [Tue, 20 Aug 2019 16:53:10 +0000 (22:23 +0530)]
Update docs header to Magnesium in the master

Should be Magnesium on master and Sodium on stable/sodium.

Signed-off-by: Anushka Bhandari <anushka16134@iiitd.ac.in>
Change-Id: I97861f561d1c156cd5c28b31adc87b716f1d3a25

4 years agoBump odlparent->6.0.0,mdsal->5.0.3 86/84986/21
xcheara [Tue, 8 Oct 2019 07:22:19 +0000 (12:52 +0530)]
Bump odlparent->6.0.0,mdsal->5.0.3

Change-Id: Id1eaa17acbfd499e2c69e6574f382d8a58d3951a
Signed-off-by: xcheara <chetan.arakere@altencalsoftlabs.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: xcheara <chetan.arakere@altencalsoftlabs.com>
4 years agoEOS related changes for L2GW 04/84804/3
manojna v [Mon, 30 Sep 2019 09:12:25 +0000 (14:42 +0530)]
EOS related changes for L2GW

This change makes sure that whenever entity ownership change
occurs, l2gw connection and elan dpn interfaces information
is populated in the config datastore. A delay is specified
so that the 3 node odl cluster stablizes before EOS owner
for elan is selected.

This change covers a corner case where originally we could
have missed some updates that were triggered during eos
change.

Change-Id: Id1a6125edcf580f3621cd85c070e56fe09822f01
Signed-off-by: manojna v <manojna.vijayakrishna@ericsson.com>
4 years agoElan instance cache cleanup delay 98/84698/3
manojna v [Wed, 25 Sep 2019 08:53:44 +0000 (14:23 +0530)]
Elan instance cache cleanup delay

While handling undeployment of ports and network
elan interface delete is not handled properly as
elan instance itself is not available by that time.

This change retains the elan in the system for longer.

Change-Id: Iacb8e47e6cab5f1285ce1e688c755cd890bfd81c
Signed-off-by: manojna v <manojna.vijayakrishna@ericsson.com>
4 years agoBc Group population during cluster reboot 05/84505/4
manojna v [Tue, 17 Sep 2019 09:19:45 +0000 (14:49 +0530)]
Bc Group population during cluster reboot

these changes make sure that during cluster reboot scenario,
bc groups remain intact as they were before cluster reboot.

as the elan interfaces gets replayed elan broadcast group
gets reconstructed from scratch and as the final elan interface is added
elan broadcast group will become identical to what it was before cluster
reboot.

During this period where bc group starts with 1 bucket and reaches to
the correct no of buckets the broadcast traffic will be affected.

while doing bc group update, instead of replacing the group with new set
of buckets , first read existing buckets and add the new buckets to
existing buckets.

Change-Id: I111a9efa6c354724681ea4e7fc76cb6f37ba7f1e
Signed-off-by: manojna v <manojna.vijayakrishna@ericsson.com>