netvirt.git
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>
4 years agoMcast population during cluster reboot 73/84373/8
manojna v [Fri, 13 Sep 2019 11:18:13 +0000 (16:48 +0530)]
Mcast population during cluster reboot

these changes make sure that during cluster reboot scenario,
mcast remains intact as it was before cluster reboot.

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

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

while doing mcast 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: I203174ff845eb66a3a6fc685bbbd74966f91e718
Signed-off-by: manojna v <manojna.vijayakrishna@ericsson.com>
4 years agoScale-in/Scale-out for NAT. 54/84254/7
Chetan Arakere Gowdru [Fri, 6 Sep 2019 12:40:47 +0000 (18:10 +0530)]
Scale-in/Scale-out for NAT.

Description
-----------

1) NatScaleIn added to handle remove event which is
registered as a callback on if the node not unmarked as tomstone.
Whenever Scale-in of an particular DPN fails and TOMSTONE=true entry been
removed or marked as false, if that DPN have some
Router Presence(with SNAT enabled) and if the corresponding NAPT switch is
missing, this DPN will be re-elected as NAPT switch.

2) New Listener - NatTepChangeLister is added to handle remove event. The
Existing logic of NatTunnelInterfaceStateListener.remove() been moved into
this Listener. Whenever the TEP on a given DPNID is removed, this API take
care of withdrawing the FIB entries for those Floating-IP existing on this
DPN and perform re-election of NAPT Switch for a VRF to which the current
DPN is elected as NAPT Switch.

3) Changes done to validate the candidate list of DPNs set with
TOMSTONE=true and exclude them during NAPT Switch election.

Change-Id: I70704c985c3d92078fee80a19b4311de8258f834
Signed-off-by: Chetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
4 years agoVrf and AS num corrections 44/84744/2
Loshmitha [Thu, 26 Sep 2019 10:22:46 +0000 (15:52 +0530)]
Vrf and AS num corrections
AS num has been set to long and Vrf has been modified so that it gets
added to QBGP

Change-Id: Ieea690e578b9d4adc26402673fbaec6df5be0dde
Signed-off-by: Loshmitha <loshmitha@ericsson.com>
4 years agoNPEs observed in elan cli command 06/84706/1
manojna v [Wed, 25 Sep 2019 11:22:11 +0000 (16:52 +0530)]
NPEs observed in elan cli command

Putting appropriate null and empty checks to make sure
no NullPointerExceptions are observed.

Change-Id: I413d78baadd55340b695d8e57e8992284740c1cc
Signed-off-by: manojna v <manojna.vijayakrishna@ericsson.com>
4 years agoTimer and log enhancements in BGP 56/84556/3
Loshmitha [Fri, 20 Sep 2019 07:47:22 +0000 (13:17 +0530)]
Timer and log enhancements in BGP
Hold and KeepAlive timers have been added.Null checks and additional
logs are added

JIRA: NETVIRT-1627

Change-Id: I88a9154519e2095a5133e2a92a7d1f48ef599298
Signed-off-by: Loshmitha <loshmitha@ericsson.com>
4 years agoupdate mcast only from eos singleton leader node 38/84338/5
manojna v [Thu, 12 Sep 2019 11:19:22 +0000 (16:49 +0530)]
update mcast only from eos singleton leader node

update mcast from single odl node to avoid conflicting modification
exceptions

Change-Id: I957d400e736ad8fed05330bd22b248001a46ee51
Signed-off-by: manojna v <manojna.vijayakrishna@ericsson.com>
4 years agoBump mdsal to 4.0.6 57/84457/4
Robert Varga [Sat, 14 Sep 2019 18:03:31 +0000 (20:03 +0200)]
Bump mdsal to 4.0.6

This picks up the latest fixes.

Change-Id: I8ec178ca726c1df504efc4f19d2c9c80965d93be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent to 5.0.2 56/84456/4
Robert Varga [Sat, 14 Sep 2019 18:03:11 +0000 (20:03 +0200)]
Bump odlparent to 5.0.2

This bumps odlparent to pick up latest references.

Change-Id: Ica16c98bd6eeeb2530bdc9cee4bb7f198e4a6ab0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoPrevent Bulk OvsDB Node read during ext-network creation. 78/84278/3
Chetan Arakere Gowdru [Mon, 9 Sep 2019 11:50:55 +0000 (17:20 +0530)]
Prevent Bulk OvsDB Node read during ext-network creation.

Description:
In KPI environment, The external Provider network of GRE type are
mistakenly configured with physical-network name(public) which is not
valid. The physical-network-name parameter is only valid for flat/vlan
provider type use-cases.

Check added to prevent this bulk read other provider network
type(gre/vxlan)

Change-Id: I6936b0f178681155aa33e03e838c892d269df882
Signed-off-by: Chetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
4 years agoHandling SNAT cluster reboot failure 81/84281/4
Chetan Arakere Gowdru [Mon, 9 Sep 2019 12:41:40 +0000 (18:11 +0530)]
Handling SNAT cluster reboot failure

Description:
During Cluster reboot, the ext-router listener got the add event
following by update event(update of other parameters other then
enable/disable SNAT). When add event is recevied, a DPN is tried to
elect as NAPT switch, but since the CSS are not yet connect, Napt Switch
was not elected.

During update event, the Napt Switch was just elected without any
installation of flow(as there is no changes in enable/disable snat)
rersulting in failure.

Changes are done to handle update() event properly to install SNAT
related flows also when Napt Switch is elected.

Change-Id: I64f47dddf077ce7818ae6c76a497419dedb975f1
Signed-off-by: Chetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
4 years agoCreating vlan bindings upfront 73/84273/3
manojna v [Mon, 9 Sep 2019 07:04:13 +0000 (12:34 +0530)]
Creating vlan bindings upfront

Instead of waiting for the logical switch to be populated
in the oper ds first, we push the vlan bindings along
with the logical switches.

Change-Id: I8d2bb8c479f08c2ad412202db012d14dc80c17a6
Signed-off-by: manojna v <manojna.vijayakrishna@ericsson.com>
4 years agoAdding BC group update job. 34/84034/11
manojna v [Wed, 28 Aug 2019 11:07:59 +0000 (16:37 +0530)]
Adding BC group update job.
Instead of all cics writing bc group information into ds,
only Entity Owner cic will write this into the datastore.

Change-Id: Idb0b81446b2f9d545098a8034cf80b14f1a967fe
Signed-off-by: manojna v <manojna.vijayakrishna@ericsson.com>
4 years agoECMP UC2 Enhancement: Support for more than two DC-GWs 40/83340/5
Ankit Jain [Wed, 4 Jul 2018 09:49:22 +0000 (15:19 +0530)]
ECMP UC2 Enhancement: Support for more than two DC-GWs

Following changes are done as part of this enhancement:

1. Creates nc2 load balancing groups with each group having two
buckets pointing towards DC-GWs.
Quagga bgp will only advertise two routes and based on the routes
advertised, table 21 will point to one of the groups.

2. Marks buckets down when external tunnel end point gets
deleted.

3. Yang changes to store DC-GWs.

Note: After this change, DC-GW load balancing gropus will
not be deleted forever, which is fine because Neighbhor
add/delete are initial operations and will not be performed frequently.

Following are the scenarios which will end up having stale groups:
a) When tunnel is deleted and BGP neighbor comes up with
different tunnel ip.
b) When tunnel and BGP neighbor both are deleted.

Change-Id: I74b1025751b58a7d0d19be19e2edd13c8205bde7
Signed-off-by: Ankit Jain <ankit.j.jain@ericsson.com>
Signed-off-by: Amitesh Soni <amitesh.soni@ericsson.com>
4 years agoLimit BUM traffic to DHCP namespaces 54/83054/10
Shashidhar Raja [Mon, 4 Feb 2019 14:13:44 +0000 (19:43 +0530)]
Limit BUM traffic to DHCP namespaces

Change-Id: Iab29f3303472426aae17e232c6c197a73e99d388
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
4 years agoRemove Acl rule may throws NPE 92/83592/2
zhangninglc [Tue, 13 Aug 2019 10:15:15 +0000 (18:15 +0800)]
Remove Acl rule may throws NPE

Issue Description:
=================
Acl access list entries may be null, call its method must throwing NPE;

ERROR 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)
~[?:?]

Solution:
=========
Check AccessListEntries not null before call its method;

Change-Id: I6583b200647a5484ca2e60c711b233ae2178e472
Signed-off-by: zhangninglc <zhangninglc@inspur.com>
4 years agoMigrate MockitoJUnitRunner 59/84459/2
Robert Varga [Sat, 14 Sep 2019 19:03:18 +0000 (21:03 +0200)]
Migrate MockitoJUnitRunner

The primary source of this class has changed, migrate to the new
location.

Change-Id: I42c8dda823046c93090314bcbd9063e3ec41bf85
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix checkstyle 55/84455/3
Robert Varga [Sat, 14 Sep 2019 18:27:37 +0000 (20:27 +0200)]
Fix checkstyle

Updated checkstyle finds these violations, fix them up.

Change-Id: Iae840afdec62e85b1552b4d79406473a84b01144
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoNova-delete is not working for ECMP UCs. 27/84027/3
Amitesh Soni [Wed, 28 Aug 2019 07:07:42 +0000 (12:37 +0530)]
Nova-delete is not working for ECMP UCs.

In ECMP, when router is associated with bgpvpn,
nova delete was not clearing up relevant DSs
(because of recent changes in MIP UC)

Correcting this logic where removeLearntPrefixFromBGP
is called only when adjacency is learnt IP.

Change-Id: Ie289378fcab8b5d6d69d825b9b9e708aabfb2e29
Signed-off-by: Amitesh Soni <amitesh.soni@ericsson.com>
4 years agoAdding L2GW related HA code changes. 10/84010/7
manojna v [Tue, 27 Aug 2019 11:05:20 +0000 (16:35 +0530)]
Adding L2GW related HA code changes.
Skip copying unnecessary, unused data(like RemoteUcast, RemoteMcast)
from child to parent.
Properly copy parent config data to child config data.

Change-Id: I768088b59fe3b934508763853cb0447ce174815a
Signed-off-by: manojna v <manojna.vijayakrishna@ericsson.com>
4 years agoFix for missing DHCP flow for SR-IOV VMs 68/83368/3
Ankit Jain [Wed, 26 Sep 2018 05:57:44 +0000 (11:27 +0530)]
Fix for missing DHCP flow for SR-IOV VMs

There is a race condition between NodeListener and
InterfaceListener. It was observed that when new node
got connected, both (NodeListener and InterfaceListener)
events were not handled as tunnel state was unknown.
Hence selection of the designated didn't happen and
DHCP flow was not programmed for SR-IOV VMs.

Fix is made to handle only the InterfaceListener event,
since when node gets connected/disconnected,
we get interface event as well.

Change-Id: I65758220a8d63ad1e91ae38f8895cc10861173ec
Signed-off-by: Ankit Jain <ankit.j.jain@ericsson.com>
4 years agoAdding logs to elan interface add operation. 54/84154/3
Amitesh Soni [Tue, 3 Sep 2019 06:24:15 +0000 (11:54 +0530)]
Adding logs to elan interface add operation.

Change-Id: I8f3080aa50d40a3ee818463ae662bfd8b04ff6dd
Signed-off-by: Amitesh Soni <amitesh.soni@ericsson.com>
4 years agoHandle ElanTunnelISL NumberFormatException 57/84057/1
Stephen Kitt [Thu, 29 Aug 2019 08:11:26 +0000 (10:11 +0200)]
Handle ElanTunnelISL NumberFormatException

This explicitly handles NumberFormatException when converting from
String to BigInteger, without queuing a job if the input data is
invalid.

Change-Id: If9c8e479970c72824ddc399c0f1971dd422842b2
Signed-off-by: Stephen Kitt <skitt@redhat.com>
4 years agoNapt Switch Over not happening 43/83043/7
Chetan Arakere Gowdru [Mon, 15 Jul 2019 10:42:57 +0000 (16:12 +0530)]
Napt Switch Over not happening

Description : With using heat template for clean-up, it's been observed
that when the interface is removed from router north-bound event is
received, the ietf-interface entry in config DS been already deleted. As a
result, the router-interface remove event returns with only deletion of
interface-to-router mapping and not deleting any entry from
neutron-router-dpns(as unable to obtained dpn for the interface).

When interface-state south bound event is triggered, interface-to-router
mapping is already deleted and this event also returns without deleting
entry from neutron-router-dpns. As a result, the earlier continues to act
as napt switch for a given router even through it doesn't has any router
presence.

Changes are done to prevent immediate deletion of interface-to-router
mapping during north-bound event, so that this interface-to-router data is
available during south-bound event resulting in proper deletion of
neutron-router-dpns entry and triggers Napt Switch Re-election.

Issue : NETVIRT-1614

Change-Id: Ib9e8a6ea2b59ad073b9e6e3551bd6df1bd44fd96
Signed-off-by: Chetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
4 years agoFix for big log statement 28/84028/1
Amitesh Soni [Wed, 28 Aug 2019 08:08:37 +0000 (13:38 +0530)]
Fix for big log statement

Entire object of class Node is printed into LOG.debug
Printing only NodeID instead of the whole Node object.

Change-Id: I4bcf6383c6cf28cfe6195f94d53469a935cfd3f6
Signed-off-by: Amitesh Soni <amitesh.soni@ericsson.com>
4 years agoELAN flows overlap with VPN flows in Table36 91/83091/8
Karthikeyan Krishnan [Thu, 18 Jul 2019 08:49:17 +0000 (14:19 +0530)]
ELAN flows overlap with VPN flows in Table36

Issue:
======
ELAN flows overlap with VPN flows in Table36 as a result
of this issue L3VPN data traffic is lost.

Solution:
=========
This fix here attempts to make the following changes:
1. Make flows programmed by VPN into Table 36 (Terminating Service
Table) to carry a priority of 8 instead of the old priority of 5.

2. Make the floating-ip flows programmed by NAT into Table 36 (Terminating
Service
Table) to carry a priority of 8 instead of the old priority of 5.

3.  NAT does program NAPT-Switch to Non-NAPT-Switch flows into Table 36
with a priority of 10.  We have left this priority remain the same
(i.e., unchanged).

JIRA Ticket : NETVIRT-1619

Change-Id: If451756863b069eac06e788f83fcbad33966a2d3
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
4 years agoUse Python 3 for pre-commit env 13/84013/1
Thanh Ha [Tue, 27 Aug 2019 12:48:29 +0000 (08:48 -0400)]
Use Python 3 for pre-commit env

Rather than fighting the inevitable of Python 2 EOL. Use Python 3
as the base Python system for the pre-commit check.

Change-Id: I2c2453fcf6dfc2e178549f2a1ff5b9c2d502f2e5
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
4 years agoSubport: Ping failed after cluster reboot 42/83042/4
Shashidhar Raja [Mon, 15 Jul 2019 10:29:12 +0000 (15:59 +0530)]
Subport: Ping failed after cluster reboot

With cluster reboot, subport interfaces some times gets created as Trunk
interfaces. This is mainly because of port and trunk replay executing in
irregular order after reboot sometimes.

Below changes are done to fix above problem:
(a) New yang container as shown below is introduced to save subport details
needed for creating subport-interface in CONFIG DS (this is defined in neutronvpn.yang)

    container neutron-vpn-port-id-subport-data {
        config true;
        list port-id-to-subport {
            key port-id;
            leaf port-id { type yang:uuid; }
            leaf vlan-id { type uint32; }
            leaf trunk-port-id { type yang:uuid; }
        }
    }

(b) After cluster restart, get details about subport from config DS using neutron port id.
If data is present, create interface as subport interface (trunk-member) otherwise create
it as trunk interface.

Change-Id: I8a7baf868ef51c1f8264d79020564e2e89207bfa
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
4 years agoGracefully Handle IDManager failure in NAT 38/83038/7
Chetan Arakere Gowdru [Mon, 15 Jul 2019 07:33:02 +0000 (13:03 +0530)]
Gracefully Handle IDManager failure in NAT

Description:

If there are any idmanager issue while allocating or releasing IDs
from the Pool, NAT need to handle it gracefully and log proper error
messages in Failure Cases.

Issue : NETVIRT-1612

Change-Id: I0c47239d6e50f531aa6abdc4ac41894afd90e583
Signed-off-by: Chetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
4 years agoAdding l2gw related cache changes 41/83341/7
manojna v [Wed, 31 Jul 2019 10:26:00 +0000 (15:56 +0530)]
Adding l2gw related cache changes

Performance improvement to reduce DS reads by making
use of caches efficiently.

Change-Id: I4cdcfad6019c078fc406e41d94010e299dd234d9
Signed-off-by: manojna v <manojna.vijayakrishna@ericsson.com>
4 years agoDrop PowerMock 83/83883/1
Stephen Kitt [Thu, 22 Aug 2019 09:04:59 +0000 (11:04 +0200)]
Drop PowerMock

ExternalNetworksChangeListenerTest is the last user of PowerMock, and
doesn’t actually test anything. Removing it means we can remove our
last dependency on PowerMock.

Change-Id: Ib81a5f67e363617788034a813f6bedbb8a2f59a7
Signed-off-by: Stephen Kitt <skitt@redhat.com>
4 years agoNPE in ACL service 75/83175/5
Somashekar Byrappa [Fri, 19 Jul 2019 12:45:08 +0000 (18:15 +0530)]
NPE in ACL service

Handled NullPointerException in ACL service.

Change-Id: Ibd67f768ab8b578414e5343af06f615afa1b1362
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
4 years agoBump mdsal to 4.0.4 35/83735/2
Robert Varga [Thu, 15 Aug 2019 08:43:24 +0000 (10:43 +0200)]
Bump mdsal to 4.0.4

This brings in latest fixes.

Change-Id: I59f89ef4fe76ef16fcdc9b59f8d9b50aa0849847
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemoving the scale-in/scale-out changes from netvirt 96/83496/3
manojna v [Wed, 7 Aug 2019 07:30:49 +0000 (13:00 +0530)]
Removing the scale-in/scale-out changes from netvirt

Since scale-in/scale-out changes have been moved to genius,
we are removing it from netvirt.

Change-Id: Ib487fb9d567ac43e3666dd8f2b4e5254a8f70473
Signed-off-by: manojna v <manojna.vijayakrishna@ericsson.com>
4 years agoBump versions by x.y.(z+1) 51/83551/1
jenkins-releng [Mon, 12 Aug 2019 16:14:12 +0000 (16:14 +0000)]
Bump versions by x.y.(z+1)

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

4 years agoElan interface add throwing NPE 99/83499/3
zhangninglc [Wed, 7 Aug 2019 08:28:04 +0000 (16:28 +0800)]
Elan interface add throwing NPE

Issue Description:
=================
Elan instance name may be null, add to ConcurrentHashMap must throw NPE

ERROR | opendaylight-cluster-data-notification-dispatcher-40 |
DataTreeChangeListenerActor      | 235 -
org.opendaylight.controller.sal-clustering-commons - 1.9.1 |
member-2-shard-default-config: Error notifying listener
org.opendaylight.genius.mdsalutil.cache.DataObjectCache$$Lambda$1291/872119028@32410eae
java.lang.NullPointerException: null
    at org.opendaylight.netvirt.elan.cache.ElanInterfaceCache.added(ElanInterfaceCache.java:75)
    at org.opendaylight.netvirt.elan.cache.ElanInterfaceCache.added(ElanInterfaceCache.java:37)

Solution:
=========
Determine that the Elan instance name cannot be null before adding

Change-Id: I21f2f93427aec92b708725dd41aa37cd37e7dcac
Signed-off-by: zhangninglc <zhangninglc@inspur.com>
4 years agoEnable troubleshooting for fib and subnetroute 14/83014/5
Surendar Raju [Thu, 11 Jul 2019 05:26:12 +0000 (10:56 +0530)]
Enable troubleshooting for fib and subnetroute

Enables few logs to help in troubleshooting fib/subnetroute
issues in fields.

Change-Id: I1688931743916d30ec2079a95661cf16813d2314
Signed-off-by: Surendar Raju <surendar.raju@ericsson.com>
4 years agoACL: NullPointerException in AclEventListener 79/82979/4
Shashidhar Raja [Tue, 9 Jul 2019 13:17:23 +0000 (18:47 +0530)]
ACL: NullPointerException in AclEventListener

Added validations to check getAccessListEntries() before
using it to access getAce() in AclEventListener

Change-Id: I5d7ddac957111bfcc2b5fee2d91bb8e56f925982
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
4 years agoStale table=44 flows remains on VM deletion 86/82986/7
Chetan Arakere Gowdru [Wed, 10 Jul 2019 08:30:34 +0000 (14:00 +0530)]
Stale table=44 flows remains on VM deletion

Issue: When VM having multiple both TCP and UDP sessions are established, when
such VM is deleted, we were only taking care of deleting flows either
related to TCP or UDP session which is incorrect. This been resulting in
huge number of table=44 flows left over after deletion of VM.

Changes done.
1) Changes done to take care of cleaning of both TCP and UDP session and
it's respective flows(table 44/46) on deletion of VM.
2) Changes done to change the key on the table=44 flow to have internal
ip/port instead of external ip/port. As a result, when table=46 flow
expiry, we can still go ahead construct table=44 flow key to delete
without refering the intext-ip-port-map DS.
3) Changes done to address deletion of table 44 and table 46 flows
whenever the subnet is removed from the Router.

JIRA : NETVIRT-1611

Change-Id: I4c8502832fd64368af1d630d1fb41e89e2cb1512
Signed-off-by: Chetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
4 years agoClose All MDSAL read transcations 89/83189/4
Surendar Raju [Mon, 22 Jul 2019 07:20:44 +0000 (12:50 +0530)]
Close All MDSAL read transcations

Always Close all the MDSAL
Read Transactions after use Transaction has not been
closed for ReadOnlyTransaction which leads to
unnecessary delay in destroying the shard
traction actors (in case of remote reads). This would
lead to memory leak and can also cause delay in creating
data tree snapshots for reads/writes. As a solution
tx.close() is been added to all ReadOnlyTransaction.

Change-Id: I3977f708ae3427d2f371c228d6ba4d773e9d74cd
Signed-off-by: Surendar Raju <surendar.raju@ericsson.com>
4 years agoBump mdsal to 4.0.3 52/83152/5
Robert Varga [Thu, 18 Jul 2019 16:19:37 +0000 (18:19 +0200)]
Bump mdsal to 4.0.3

This bumps mdsal to 4.0.3, bringing in latest fixes and improvements.

Change-Id: Ie8e03aab1f31edf80bc9f1d7896c334c9d83be8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent to 5.0.1 51/83151/4
Robert Varga [Thu, 18 Jul 2019 16:14:32 +0000 (18:14 +0200)]
Bump odlparent to 5.0.1

This picks up the latest upgrades.

Change-Id: If6006a94197839a9718cd5eae16b0a025913af93
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFixing CSIT Failure issue due to existing merge[0] 45/83345/1
Karthikeyan Krishnan [Thu, 1 Aug 2019 07:06:42 +0000 (12:36 +0530)]
Fixing CSIT Failure issue due to existing merge[0]

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

Change-Id: Ie7b5fac7a7a0ec7269069270c2ff6c36aa5757a7
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
4 years agoNAT not working after Replay-Based-Upgrade 26/83226/2
Chetan Arakere Gowdru [Wed, 24 Jul 2019 09:06:28 +0000 (14:36 +0530)]
NAT not working after Replay-Based-Upgrade

Description: we noticed that the SNAT flows 26->46, 36->46
flows are missing when RBU is perfomed.

Root cause : The flows are actually installed by iterating over the
DPNs retrieved from router-dpn-list, but as this is an operational
DS and is empty initially while doing RBU, the flows installation code is not hit

Solution: As we already have the NAPT switch ID, install the flows
without interating over the router-dpn-list.

Issue: NETVIRT-1617

Change-Id: Ie3b027356f754830e1cfd37d6c2daffdbf9bfa94
Signed-off-by: Chetan Arakere Gowdru <chetan.arakere@altencalsoftlabs.com>
4 years agoMPLS label for the def GW missing in the of-flows 27/83027/5
Karthikeyan Krishnan [Fri, 12 Jul 2019 08:01:07 +0000 (13:31 +0530)]
MPLS label for the def GW missing in the of-flows

Issue:
=======
MPLS label for the default GW missing in the of-flows.

RCA:
====
populateFibOnNewDpn failing due to ITM failures as a result of
this ITM failure FIB Manager is unable to write the
default GW flow entry in the FRM DS.

Solution:
=========
Safeguarding populateFibOnDpn from other module failures.
Also a logger statement in FibUtil rethrows exceptions and
that could create issues for VPNEngine.

Enhanced existing logs inside nexthopmanager, so we know
for which vrfentry we flopped to add flows.

Change-Id: Ic1ee05111a84a34ce0fad237b08b8b091ca43f1e
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
4 years agoTSC-181 : ITM Yang Models Cleanup 36/83236/1
Faseela K [Wed, 24 Jul 2019 11:33:03 +0000 (11:33 +0000)]
TSC-181 : ITM Yang Models Cleanup

Restoring the original patch, as merge issues are fixed now.

Change-Id: Ie96687d6c0e320c41fb63ec9235c99f59f643091
Signed-off-by: Faseela K <faseela.k@ericsson.com>
4 years agoRevert "TSC-181 : ITM Yang Models Cleanup" 06/83206/1
Faseela K [Tue, 23 Jul 2019 09:52:23 +0000 (09:52 +0000)]
Revert "TSC-181 : ITM Yang Models Cleanup"

This reverts commit e21274dbeb7bcad709a9ca438f8c1a968d053707.
Genius merge jobs are failing for some other reason, due to which the required artifacts for this change are not published. This is blocking everyone else, as builds are failing now, and hence reverting till the merge job issues are fixed

Change-Id: Ie9e0945d19d4a039c530fef0511c4a414750d944
Signed-off-by: Faseela K <faseela.k@ericsson.com>
4 years agoTSC-181 : ITM Yang Models Cleanup 01/81901/8
Apurba Mukherjee [Mon, 6 May 2019 05:20:50 +0000 (10:50 +0530)]
TSC-181 : ITM Yang Models Cleanup

Change-Id: Ic6330cb9b5521c4df04713b01e89f13e906c9d9f
Signed-off-by: Apurba Mukherjee <apurba.mukherjee@ericsson.com>
4 years agoPin detox 99/83199/1
Anil Belur [Mon, 22 Jul 2019 22:30:38 +0000 (08:30 +1000)]
Pin detox

detox 0.19 is not compatible with the version of tox we are
getting from upstream

Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Change-Id: I1e4284709702d99125927d945af4c4ee90f0dd96

4 years agoUpdate netvirt-openstack verified combinations 25/83025/2
Faseela K [Fri, 12 Jul 2019 07:20:53 +0000 (12:50 +0530)]
Update netvirt-openstack verified combinations

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