netvirt.git
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)

5 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

5 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>
5 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>
5 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>
5 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>
5 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

5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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

5 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>
5 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

5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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

5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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

5 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>
5 years agoECMP-fib entry not populated correctly 37/82937/3
Amitesh Soni [Fri, 5 Jul 2019 06:48:59 +0000 (12:18 +0530)]
ECMP-fib entry not populated correctly

1. File: NeutronRouterChangeListener
- During Router Update, consolidating the original and updated routes,
the logics for calculation of the Routes to be added and routes to be
deleted were incorrect. It was deleting everything from the list
containing Routes to be deleted.

2. File: VpnInterfaceManager
- While deletion of adjacencies from odl-l3vpn:vpn-interface-op-data
datastore,  merge call was not removing it. Now using delete instead,
which is working.

3. File: VpnUtil
- Added InstanceIdentifier builder for reaching the correct adjacency
which would be deleted after merge.

Change-Id: I7299e642484c97dada3f966153b88d64c0cabf20
Signed-off-by: Amitesh Soni <amitesh.soni@ericsson.com>
5 years agoSimplify getInvolvedL2GwDevices() 02/82802/4
Robert Varga [Sat, 29 Jun 2019 11:20:33 +0000 (13:20 +0200)]
Simplify getInvolvedL2GwDevices()

The result of this method is always used to acquire values stored,
hence update the implementation to report a Collection of values.

Change-Id: I82859ee6ce6ecf6f17a8d06a8375f1f44c2800ff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove use of org.opendaylight.genius.utils.cache.CacheUtil 01/82801/3
Robert Varga [Sat, 29 Jun 2019 11:07:27 +0000 (13:07 +0200)]
Remove use of org.opendaylight.genius.utils.cache.CacheUtil

This class has been deprecated, this patch updates ElanL2GwCacheUtils
to work with a LoadingCache and ConcurrentHashMap, updating CLI access
to match.

Change-Id: I448b0d8445ded9c466a38ba56f846413b7bd48af
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoACL: VM IP address failures and ID Pool issues 08/82908/2
Shashidhar Raja [Wed, 20 Feb 2019 15:21:01 +0000 (20:51 +0530)]
ACL: VM IP address failures and ID Pool issues

Below ACL issues are fixed:

(a) Issue: Tenant VM IP address failures

    Fix: Cache was not updated properly in AclInterfaceStateListener. This was
           resulting in wrong lport and dpnid in cache. Updated to rectify this
           problem in AclInterfaceStateListener.

(b) Issue: Ids exhausted for pool : ACL-TAG-POOL

    Fix: In Event listener there was wrong check for SecurityRule in
         add(), remove() and update() methods. The check in remove() some times
         was resulting in releaseId of ACL-TAG-POOL not being called. This was
         resulting in Ids exhausted when large number of ACLs were created and
         deleted. Check for SecurityRule in add(), remove() and update() is
         removed to fix the problem.

(b) Issue: ACL-TAG-POOL error with releaseId

    Fix: In the current code, releaseId of ACL-TAG-POOL is called on all
         the nodes of cluster. On one node releaseId would have succeeded and
         on other two nodes, error reported would be observed. Code is updated
         now to invoke releaseId with Entirty check so that it gets executed on
         only one node instead of all the nodes.

Change-Id: Iba0e6486795cfd867db03487b24c069ac06f35eb
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
5 years agoLarge READ by Netvirt ELAN 27/82827/3
Paul Joseph [Tue, 4 Jun 2019 07:00:47 +0000 (12:30 +0530)]
Large READ by Netvirt ELAN

Removed a redundant READ of Operational datastore.

Change-Id: Ib2f1e6a83f38605f22cf9aabf847d0ab2bbacdfc
Signed-off-by: Paul Joseph <paul.joseph@ericsson.com>
5 years agoACL: Multicast Aap Port and Recover acl-interface 26/82826/2
kiranvasudeva [Wed, 27 Feb 2019 14:40:38 +0000 (20:10 +0530)]
ACL: Multicast Aap Port and Recover acl-interface

Below ACL issues are fixed:

(a) Issue: Port having Multicast AllowedAddressPair-Mac same as other
           AAP-mac was filtered out from being added for DHCP client traffic flows.

    Fix: Filtering of AAPs required only in case of Port-Update.
         added checks to remove Multicast AAPs before finding the duplicate mac.

(b) Issue: srm:recover-instance-ACL-INTERFACE removes the flows when the
           command is executed again`

    Fix : Removing redundant interface remove during recovery. Remove
          method is redundant, since we only need to add flows for AclInterface.
          Having remove is causing cache update issue, where-in object in
          AclInterfaceCache is getting removed after first add is successful. loss
          of interfaceState information from cache causing add to fail subsequent
          invocations.`

Change-Id: Ib966034fc395b3b501e1756fa6fbade0be9f0f13
Signed-off-by: kiranvasudeva <kirankumar.v@altencalsoftlabs.com>
5 years agoRemove powermock version overrides 95/82795/1
Robert Varga [Sat, 29 Jun 2019 08:52:18 +0000 (10:52 +0200)]
Remove powermock version overrides

odlparent is shipping version 2.0.0, there is no point in overriding
its versions.

Change-Id: I372ef185bbd00807d73904cb0bbacdd3341c4614
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate ElanUtils to use NamedLocks 07/82607/2
Robert Varga [Thu, 20 Jun 2019 17:59:40 +0000 (19:59 +0200)]
Migrate ElanUtils to use NamedLocks

This use was missed by previous translation due to indirection
created by utility methods.

getElanMacDPNKey() is serving two purposes, really, which is as
a job key for JobCoordinator and also as the locking object.

This patch moves the first use to ElanPacketInHandler, which is
the sole user and removes the intern() call, as JobCoordinator
works on equality.

Second use case is locking of elans, which is migrated to NamedLocks,
as there do not seem to be any other callers who would be using
magic strings involved there. Rather than using strings, we expose
a lockElanMacDPN() method, which looks up and acquires the specific
lock, returning the handle back to caller. Callers are converted
to use normal try-with-resources to ensure the lock is released when
no longer needed.

JIRA: NETVIRT-1510
Change-Id: I0292e0e9a4e51ab98e62be5f01d59cb337ff1421
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove use of StringBuffer 42/82642/2
Robert Varga [Fri, 21 Jun 2019 05:58:26 +0000 (07:58 +0200)]
Remove use of StringBuffer

StringBuilder is a faster replacement of StringBuffer, use that
instead.

Change-Id: I68fddef4afb04b0b7fbcd895625abbb7a9133a77
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not intern strings passed to JobCoordinator 08/82608/2
Robert Varga [Thu, 20 Jun 2019 18:06:55 +0000 (20:06 +0200)]
Do not intern strings passed to JobCoordinator

JobCoordinator is using key equality, not identity, to determine
where to put a particular job -- which means String.intern() is
completely unnecessary.

Change-Id: I29c805608a731f2775c06c661084f64c6e1847ee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMove ElanUtils.getElanMacKey() 06/82606/1
Robert Varga [Thu, 20 Jun 2019 17:41:28 +0000 (19:41 +0200)]
Move ElanUtils.getElanMacKey()

This method is not use for synchronization, but only in a single
place to form a JobCoordinator key. Move it ElanPacketInHandler
and stop doing String.intern(), as that is completely unnecessary.

JIRA: NETVIRT-1510
Change-Id: I2357c1e0255198d8a0285a56395aa97f57f16cf3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse JvmGlobalLocks in vpnmanager 15/77915/12
Robert Varga [Sun, 18 Nov 2018 16:17:11 +0000 (17:17 +0100)]
Use JvmGlobalLocks in vpnmanager

JvmGlobalLocks is giving us all we need to replace String.intern(),
user that.

JIRA: NETVIRT-1510
Change-Id: I34ebaf2460f051b8bd8e728730d51a54c2f39afd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUpdate openstack-with-netvirt.rst to reflect current status 03/82403/3
Yi Yang [Wed, 5 Jun 2019 01:32:53 +0000 (21:32 -0400)]
Update openstack-with-netvirt.rst to reflect current status

- Remove docs/openstack-guide/dlux-login.png
- Remove docs/openstack-guide/dlux-with-switches.png
- Remove odl-dlux-core because they are not available any more

JIRA: NETVIRT-1603

Change-Id: I1c2a914807f78d714b35717e477a7bd6dc014adc
Signed-off-by: Yi Yang <yangyi01@inspur.com>
5 years agoSwitch to using pre-commit instead of coala 27/82427/3
Thanh Ha [Thu, 6 Jun 2019 21:18:55 +0000 (17:18 -0400)]
Switch to using pre-commit instead of coala

The Coala linter for GitCommit Hooks requires the Python NLTK
library which in the past couple of days started depending on
numpy. Let's switch to pre-commit so that we don't have to pull
in numpy.

Change-Id: Ic13381bccaf6e113f9e617b8ed840624b769e47b
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
5 years agoCleanup trailing whitespace 28/82428/1
Thanh Ha [Thu, 6 Jun 2019 21:27:20 +0000 (17:27 -0400)]
Cleanup trailing whitespace

Change-Id: I27242089fa611cd4e85895c16e15f2fc3a10a9d7
Signed-off-by: Thanh Ha <zxiiro@gmail.com>