netvirt.git
5 years agoDual Stack feature support for router interface 90/79090/10
Karthikeyan Krishnan [Mon, 31 Dec 2018 08:19:34 +0000 (13:49 +0530)]
Dual Stack feature support for router interface

We create a dual-stack neutron port and attach this
port to the router.
This single neutron port is then responsible for
handling both IPv4 and IPv6 subnets in that network.
The advantage of this approach is that it reduces
the number of Neutron router ports.

Issue: NETVIRT-1543

Change-Id: I043cd7683a8dc434f5d61886101915dfc01727c7
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
5 years agoUse JvmGlobalLocks in fibmanager 17/77917/12
Robert Varga [Sun, 18 Nov 2018 19:15:14 +0000 (20:15 +0100)]
Use JvmGlobalLocks in fibmanager

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

JIRA: NETVIRT-1510
Change-Id: I50df601bb6c50cbcca72d2741cbbe66938ef5551
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse JvmGlobalLocks in natservice 16/77916/12
Robert Varga [Sun, 18 Nov 2018 18:54:19 +0000 (19:54 +0100)]
Use JvmGlobalLocks in natservice

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

JIRA: NETVIRT-1510
Change-Id: I3ff5813add320377ecccad75f6feae075c49055d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse JvmGlobalLocks in elanmanager 14/77914/11
Robert Varga [Sun, 18 Nov 2018 15:54:00 +0000 (16:54 +0100)]
Use JvmGlobalLocks in elanmanager

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

JIRA: NETVIRT-1510
Change-Id: I72bc211512519e68f06394d28f539bf29f6cd16c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse JvmGlobalLocks in neutronmanager 13/77913/11
Robert Varga [Sun, 18 Nov 2018 15:43:20 +0000 (16:43 +0100)]
Use JvmGlobalLocks in neutronmanager

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

JIRA: NETVIRT-1510
Change-Id: Ib97d513902f69ab158423dd6cd28bd43ba1e5c8e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoStale 21->snat_group flow for external subnet 61/73061/17
xcheara [Sat, 16 Jun 2018 16:16:35 +0000 (21:46 +0530)]
Stale 21->snat_group flow for external subnet

Description:
Its been observed that, even on clean-up on External-network Suite,
few of the stale flows 21->snat_group for external subnet where not
been deleted. As a result, Bundle Resync test-case getting failed
with rersync flag enabled due to these stale flows pointing to an
snat_group with corresponding group missing.

Changes are done to take care of clearing vpn-instance-op-data DS
for external-fixed-ip properly ersutling in triggering
ExternalSubnetVpnInstanceListener
and take care of clearing these stale-flows.

Issue : NETVIRT-1311

Change-Id: I773a2f9935a600b7710796d21d9ce39cf4b9a8c0
Signed-off-by: xcheara <chetan.arakere@altencalsoftlabs.com>
Signed-off-by: shaik <shaik.b@altencalsoftlabs.com>
5 years agofix unclosed ReadTransaction 10/72710/12
xcheara [Wed, 6 Jun 2018 06:50:39 +0000 (12:20 +0530)]
fix unclosed ReadTransaction

JIRA : NETVIRT-1295

Change-Id: I5264c49226c8e964a6bcfe2b57b9b3765e5db1fd
Signed-off-by: xcheara <chetan.arakere@altencalsoftlabs.com>
Signed-off-by: Shaik <shaik.b@altencalsoftlabs.com>
Signed-off-by: shaik <shaik.b@altencalsoftlabs.com>
5 years agoNETVIRT-1520: AlivenessMonitor cache issue 83/78083/7
Anil Kumar Gujele [Fri, 23 Nov 2018 09:44:49 +0000 (15:14 +0530)]
NETVIRT-1520: AlivenessMonitor cache issue

Issue:
Say VM with MIP-IP is on DPN connected to Contorller-1, when MIP is
learnt , it populates the cache alivenessCache. When VM migrates to
another DPN, which is connected to say Controller-2, the same
alivenessCache will not have data w.r.t the monitoring session
created by Controller-1.
Hence incase of cleanup , it causes issues in stopping ArpMonitoring.
The cache is simple local cache which doesnt work incase of cluster.

Fix:
Better to read InterfaceMonitorMap directly from datastore so that
monitorId can be retrieved even if MIP moves across DPNs connected to
various controllers in cluster.

Change-Id: I1e4102a7c57bff8376d3d05be8975a6c1ad74233
Signed-off-by: Anil Kumar Gujele <anilkumar.g@altencalsoftlabs.com>
5 years agoLearnt/MIP nexthop is of different address family 94/79394/2
Somashekar Byrappa [Thu, 10 Jan 2019 07:04:26 +0000 (12:34 +0530)]
Learnt/MIP nexthop is of different address family

Issue:
------
Sporadic issue wherein learnt/MIP IPv4 address has IPv6 address as
nexthop and vice-versa in vpn-interfaces DS.

Solution:
---------
+ Added required check to make sure IPv4 MIP has IPv4 address as
  nexthop. Similarly for IPv6 MIPs.
+ This will ensure both local fixed IP and local MIPs pointing to
  same OF group in table-21.
+ Additionally simplified some part of the code in the same method by
  refactoring.

Change-Id: Ia94d0662187ed752a88eaedd9482f0539020e636
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
5 years agoadd NetworkPolicyListener 94/79294/12
Sam Hague [Mon, 7 Jan 2019 13:45:51 +0000 (08:45 -0500)]
add NetworkPolicyListener

Depends-on: Id84841e106352bd4e7937b5493cb3b4cd0df2e8f
Change-Id: I5f801ec88cb75f3590c34a50402935ed74a25794
Signed-off-by: Sam Hague <shague@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Sam Hague <shague@redhat.com>
5 years agocoe: use annotations for references 55/79855/2
Stephen Kitt [Wed, 23 Jan 2019 13:52:14 +0000 (14:52 +0100)]
coe: use annotations for references

Change-Id: I8f0e3d157c9baa24c663c7a42fdfd74609d2957a
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoStale neutronrouterdpn Oper DS cleanup 22/75622/16
xcheara [Fri, 31 Aug 2018 14:18:34 +0000 (19:48 +0530)]
Stale neutronrouterdpn Oper DS cleanup

Description:
On deletion of router, its been observed that there exists an invalid
empty entry for router in neutron-router-dpn DS. This DS will be
populated whenever an VM created/deleted on a DPN part of the router
by NAT. On deletion of all VM on a given router, the empty router
entry left over and even not clear on router deletion.

Changes done to clear the router entry on from this DS on
router deletion.

Issue : NETVIRT-1406

Change-Id: I0db96497f1da92e38268a966066d46b1bfee9e6c
Signed-off-by: xcheara <chetan.arakere@altencalsoftlabs.com>
Signed-off-by: shaik <shaik.b@altencalsoftlabs.com>
5 years agochanges for faster dcgw failure detection. 92/79792/4
Vyshakh Krishnan CH [Mon, 21 Jan 2019 11:35:35 +0000 (17:05 +0530)]
changes for faster dcgw failure detection.

faster dcgw failure detection using bfd.

Change-Id: I619e95c56f18782a4dec47f81e1f31f2bea256d7
Signed-off-by: Vyshakh Krishnan CH <vyshakh.krishnan.c.h@ericsson.com>
5 years agoFix For ECMP bucket missing on deleting l3vpn 08/74908/5
eswanit [Wed, 21 Nov 2018 10:53:36 +0000 (16:23 +0530)]
Fix For ECMP bucket missing on deleting l3vpn

Description:Adding refreshFib on submitting write
config transaction to avoid timing issues

Change-Id: Ief4d56ae0e18348ff16d29981a8bd28eeb0bbc34
Signed-off-by: eswanit <swati.udhavrao.niture@ericsson.com>
5 years agoAdd coverage aggregation 31/79831/2
Robert Varga [Tue, 22 Jan 2019 23:18:15 +0000 (00:18 +0100)]
Add coverage aggregation

This recognizes sonar build and runs jacoco report aggregation,
so that test coverage across modules is accounted for.

Change-Id: I45b303b8e87adb3d43b2405b1df5cd14791148e8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump mdsal to 3.0.6 88/79788/2
Robert Varga [Mon, 21 Jan 2019 09:26:47 +0000 (10:26 +0100)]
Bump mdsal to 3.0.6

This aligns with odlparent-4.0.9 and yangtools-2.1.8.

Change-Id: I2bc91db8df30bc3abb6691b0c4533ce86678f6eb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoBump to odlparent 4.0.9 72/79672/2
Stephen Kitt [Fri, 18 Jan 2019 15:33:24 +0000 (16:33 +0100)]
Bump to odlparent 4.0.9

Change-Id: I655523be12593dbefa5cad0fcc5a527b3a178356
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoRemove jacoco listener 83/79483/3
Sam Hague [Wed, 9 Jan 2019 22:34:19 +0000 (17:34 -0500)]
Remove jacoco listener

The listener is no longer needed. The listener was used to
bring in line information for integration tests but all
IT has been removed.

Change-Id: If3f258ed9eca78c38ec957fb912766f793cc7264
Signed-off-by: Sam Hague <shague@redhat.com>
5 years agoRemove DS operation part of Yang Consumer Thread 43/76743/16
shaik [Mon, 8 Oct 2018 11:21:25 +0000 (16:51 +0530)]
Remove DS operation part of Yang Consumer Thread

Description:
1. Changes are done to remove move the logic of
performing DS read/write and install
installation/removal to perform in the worker
thread instead of performing the same in yang
consumer thread.

2. In the private BGPVPN association case, if the
association is created first and the router-gateway-set
is done later, it is noticed that the default NAT
flow is instaled with external VPN metadata rather then
private BGPVPN metadat. Changes are done to correct it

JIRA : NETVIRT-1392

Change-Id: Ic296b2d3c1c22350518c5008ceb58df1ef17a76c
Signed-off-by: shaik <shaik.b@altencalsoftlabs.com>
5 years agoBump mdsal to 3.0.4 34/79434/1
Robert Varga [Thu, 10 Jan 2019 15:47:20 +0000 (16:47 +0100)]
Bump mdsal to 3.0.4

This realigns odlparent/yangtools/mdsal and brings in the latest
improvements.

Change-Id: I6640dd25e4af067969633b80cc73a558ccca2dbe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump odlparent to 4.0.8 19/79119/3
Stephen Kitt [Wed, 2 Jan 2019 10:24:32 +0000 (11:24 +0100)]
Bump odlparent to 4.0.8

Change-Id: I7198663389d0eca12761be89eb3b57fb75eadbd1
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoRevert "skip tests using xtend until odlparen..." 75/79275/1
Faseela K [Thu, 27 Dec 2018 14:59:49 +0000 (14:59 +0000)]
Revert "skip tests using xtend until odlparen..."

This reverts commit 5d8745a70ec5463e7753a484cec1bca53c078833.

Change-Id: I7929d968940f5132f56e584643bed2b19e6358fd
Signed-off-by: Faseela K <faseela.k@ericsson.com>
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
5 years agoSupport for advertising MTU in IPv6 RAs 70/77670/8
Sridhar Gaddam [Sun, 11 Nov 2018 14:38:59 +0000 (20:08 +0530)]
Support for advertising MTU in IPv6 RAs

This patch includes the MTU Option as part of
Solicited/Un-solicited Router Advts and also fixes
some issues in ipv6service unit tests.

Depends-On: https://git.opendaylight.org/gerrit/#/c/77668/
Depends-On: https://git.opendaylight.org/gerrit/#/c/77851/

Change-Id: Ibeae0634bbfdd8b438968e4918026e7109521c6d
Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
5 years agoIPv6 CVR North-South Support 80/73180/8
Sridhar Gaddam [Mon, 18 Jun 2018 15:01:27 +0000 (20:31 +0530)]
IPv6 CVR North-South Support

This patch programs the pipeline flows on the NAPT and non-NAPT
switch to support North-South traffic. Traffic from non-NAPT
Switch would be forwarded to the NAPT Switch from where its
sent to the external network.

In order to support the IPv6 N/S end-to-end use-case, GWMACResolution
has to happen and the necessary support would be added via a
separate patch.

Change-Id: I2fa0f57af9b063d6bd87c385ab7b1b4d1add5186
Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
5 years agoauto-config-transport-zones has incorrect default 87/79187/1
Vishal Thapar [Thu, 3 Jan 2019 15:22:27 +0000 (20:52 +0530)]
auto-config-transport-zones has incorrect default

Fix for NETVIRT-1009 modified the default in config
file for auto-config-transport-zones to false. But
it missed changing in yang file. When a param is
missing in config file, it picks off yang defaults.
This caused a discrepency in behavior due to conflicting
defaults between two.

This fixes yang default to reflect the config default
as per NETVIRT-1009.

This also fixes the log message for two listeners which
used this flag and were misleading.

Change-Id: Ic1b85b798eedd6a14a80eb6145b5a23f73923fdc
JIRA: NETVIRT-1546
Signed-off-by: Vishal Thapar <vthapar@redhat.com>
5 years agouse the provider mappings for external group 34/78434/11
Aswin Suryanarayanan [Tue, 4 Dec 2018 10:08:52 +0000 (15:38 +0530)]
use the provider mappings for external group

The dpn list for populating the external network is now retrieved from
provider mapping
instead of dpn-vpn list for flat/vlan external network.

NETVIRT-1518
Missing FIB flows when subnet is created immediately after the network
create while using vlan external networks.

Change-Id: Ice1f18eb3e903ec4334815f50f88b2ec030be1d5
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
5 years agoNETVIRT-1410 Vrf advertised after routes to DC-GW 20/77320/7
eupakir [Mon, 29 Oct 2018 13:24:18 +0000 (18:54 +0530)]
NETVIRT-1410 Vrf advertised after routes to DC-GW

On a Router/Network association, the vpn-op update to configure IpFamily
was being done after the creation of Vpn Interfaces. THis was leading to
the Networks being written to bgp before the vrf, causing failure in
advertisement of the route to DC-Gw.
This fix swaps the order of IpFamily update and VPN Interface creation.

Change-Id: I52ebf0b5abd9869dfe1c08b2f2511d0ec8468a02
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
5 years agoNETVIRT-1536: Stale flows in ACL tables 36/78636/7
Shashidhar Raja [Mon, 10 Dec 2018 10:22:14 +0000 (15:52 +0530)]
NETVIRT-1536: Stale flows in ACL tables

Stale flows in ACL tables specific to security rules are observed when
delete events received by neutronvpn and ACL are as specified below:
(1) Neutron Port Event
(2) Neutron SG Event
(3) ACL Interface/State Event
(4) ACL Event (accesslist-acl)

In order to fix this issue, introduced 'deleted' in ACE yang
definition. When SG rule is deleted, ACE would not be deleted,
instead 'deleted' would be set. ACL Event listener after
processing add/delete ACE entries, deletes all the marked ACE
entries of the ACL being updated.

Change-Id: I47ef5328bf05bbed02c5492967005cd4c41f99d6
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
5 years agoupdate extension_drivers to ml2 config file 37/78837/2
Moshe Levi [Mon, 17 Dec 2018 11:26:51 +0000 (13:26 +0200)]
update extension_drivers to ml2 config file

Change-Id: Id2bea560081c527865f4fdaac7aefd5b97be9cd3
Signed-off-by: Moshe Levi <moshele@mellanox.com>
5 years agoBump mdsal to 3.0.3 19/79019/1
Robert Varga [Sun, 23 Dec 2018 23:01:44 +0000 (00:01 +0100)]
Bump mdsal to 3.0.3

This brings in latest fixes and alignes with odlparent-4.0.5.

Change-Id: I5f4da5da46889e5a8e9a6d8955eb57dd57737ebd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoNETVIRT-1522: Allowed address pair not updated 76/78276/2
kiranvasudeva [Wed, 28 Nov 2018 12:28:53 +0000 (17:58 +0530)]
NETVIRT-1522: Allowed address pair not updated

Port with SG enabled, when updated with Allowed address pair, newly
added address is not being added into Acl Tables.

Fixed the issue by changing the checks which was causing aap's to be
skipped during port update.

Change-Id: I14e12302483783f113d2244a6267f037d0282cf9
Signed-off-by: kiranvasudeva <kirankumar.v@altencalsoftlabs.com>
5 years agoFix netvirt sonar 40/78740/3
Robert Varga [Thu, 13 Dec 2018 08:44:26 +0000 (09:44 +0100)]
Fix netvirt sonar

netvirt-sonar has been failing for 10+ months due to a mismatch
between historical project definition and changes done in
https://git.opendaylight.org/gerrit/68332

Fix this up by specifying <name>netvirt</name>, re-connecting
sonar's history.

Change-Id: I98c21e33f741ebd087aa65367ebd28cec95e27c8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse serviceutils artifacts 77/78977/3
Sam Hague [Fri, 21 Dec 2018 22:05:50 +0000 (17:05 -0500)]
Use serviceutils artifacts

Depends-on: I65406f709f45bea1a5a938932551abd99fb5ffe9
Change-Id: Iccc11bb58a6ca96ead452b0edfb44924ea0cd96f
Signed-off-by: Sam Hague <shague@redhat.com>
5 years agoBump to odlparent 4.0.5 17/78917/2
Stephen Kitt [Fri, 21 Dec 2018 09:10:52 +0000 (10:10 +0100)]
Bump to odlparent 4.0.5

Change-Id: I6eef225e25e49e404a8e2b3fbbcd8ba4341c01d8
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoSet feature capability for bgpvpn-vni 50/77250/8
Ashik Alias [Wed, 10 Oct 2018 10:48:54 +0000 (16:18 +0530)]
Set feature capability for bgpvpn-vni

This review depends on the following reviews.
https://git.opendaylight.org/gerrit/#/c/63405/
https://git.opendaylight.org/gerrit/#/c/77242/
https://review.openstack.org/#/c/614428/

Change-Id: Ic5014ab4a98338532de8e5c0dfed7647b291bcb8
Signed-off-by: Ashik Alias <ashik.alias@ericsson.com>
5 years agoCOE:Generate segmentation-id from vni pool 03/78603/5
Faseela K [Mon, 10 Dec 2018 10:57:40 +0000 (16:27 +0530)]
COE:Generate segmentation-id from vni pool

segmentation-id should be internally generated
using the common vni-pool, instead of being passed
down from COE. This will avoid vni collisions
in the datapath.

JIRA: NETVIRT-1514

Change-Id: I26b0c52bab6f15fe6f27c93d4087f8366ef9d8af
Signed-off-by: Faseela K <faseela.k@ericsson.com>
5 years agoskip tests using xtend until odlparent bump 94/78894/3
Sam Hague [Thu, 20 Dec 2018 18:49:01 +0000 (13:49 -0500)]
skip tests using xtend until odlparent bump

Change-Id: I3125520e7c7bf876a0b19b1bae7b85258fa1f365
Signed-off-by: Sam Hague <shague@redhat.com>
5 years agoDefault Tunnels deleted from config 66/78766/6
Vishal Thapar [Thu, 13 Dec 2018 17:01:46 +0000 (22:31 +0530)]
Default Tunnels deleted from config

When configuring integration bridge, we copy
bridge parameters from operational to configuration
to avoid overwriting them. If any tunnel ports were
added to config before we copyBridgeConfig, they
get overwritten and are lost.

Fix is to use a merge instead of put when copying
bridge to config. This operation is done only
during initial bringup, so overhead of using
merge is acceptable.

JIRA: NETVIRT-1541

Change-Id: I003032883ebae5e405b4d7b849fb2043179f63ff
Signed-off-by: Vishal Thapar <vthapar@redhat.com>
5 years agoIn port is set to zero after FIP translations. 35/78535/4
Aswin Suryanarayanan [Fri, 7 Dec 2018 09:19:00 +0000 (14:49 +0530)]
In port is set to zero after FIP translations.

In table 27 and table 28 in port is explicitly set to zero so that
packet will not be dropped when it has to be send back to the tunnel it
came from.

NETVIRT-1534 FIP to FIP traffic fails when the translation happens on a
remote switch

Change-Id: I10651762db43be4adc4c1584c51a954176fc63d3
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
5 years agoMigrate NAT to genius/vniutils 70/78570/8
Faseela K [Mon, 10 Dec 2018 09:22:24 +0000 (14:52 +0530)]
Migrate NAT to genius/vniutils

JIRA: GENIUS-250

Netvirt currently has a vni carving logic which is
tightly coupled with NAT. There are more netvirt
services which are in need of this utility now, and
hence we need to move this to a centralized place.
Adding a new VniUtils in genius, to which now nat is getting migrated to.

Change-Id: Ia08ad6eba9a6b5000c59dd804c8e50f17907257a
Signed-off-by: Faseela K <faseela.k@ericsson.com>
5 years agoFix COE L3 ping failure 71/78671/1
Faseela K [Wed, 12 Dec 2018 09:59:58 +0000 (15:29 +0530)]
Fix COE L3 ping failure

COE has stopped using network namespace
for vpn identification, and currently cluster-id
is being used. The same should be used
while we create vpn-interfaces.

JIRA: NETVIRT-1533

Change-Id: I6d0cdbc2eeb6e581ce0dcb34e360297b7c9e5551
Signed-off-by: Faseela K <faseela.k@ericsson.com>
5 years agoUpdate spec: Services with KubeProxy IpTables 77/77977/7
Faseela K [Tue, 20 Nov 2018 12:17:17 +0000 (17:47 +0530)]
Update spec: Services with KubeProxy IpTables

Implementation sketch for the iptables based service implementation.
This was done as a quick prototype for the ONS Demo.
The architecture and design needs to the thoroughly reviewed,
before finalising on the solution.

JIRA: NETVIRT-1491

Change-Id: Ie449080d1d9a8e4d8106bfd8d41f029dd73404c9
Signed-off-by: Faseela K <faseela.k@ericsson.com>
5 years agoneutron-vpn-portip-port-data d.s not cleared 00/78500/6
nithi thomas [Thu, 6 Dec 2018 12:37:04 +0000 (18:07 +0530)]
neutron-vpn-portip-port-data d.s not cleared

Issue:
======
Stale entry not removed for neutron-vpn-portip-port-data in NAT
use-case.

neutron-vpn-portip-port-data d.s has ipv4 ip's which is
not getting cleared after  all the configs are deleted.

Analysis:
=========
The root-cause is in case of NAT use-case when external gateway is
attached to  router, while looping through the list of ip's addition
of ipv4 ip's to vpn(internetbgpvpn) was not restricted but while
dissasociating the vpn this restriction   check is there.
        So ipv4 ip's were retained in data-store.
Added check in updateVpnInterface() in NeutronvpnManager.java
to not add ipv4 entries in neutron-vpn-portip-port-data in case of
internetbgvpn (passed the flag isInternetVpn) where isInternetVpn
flag will be true in this case.

Issue: NETVIRT-1406

Change-Id: I9ae2b1da04988aac461ff50c4a9ac5a9d80a370d
Signed-off-by: nithi thomas <nithi.t@altencalsoftlabs.com>
5 years agoECMP - MIP/learnt IPs pointing to groups 89/77989/3
eswanit [Tue, 20 Nov 2018 15:24:00 +0000 (20:54 +0530)]
ECMP - MIP/learnt IPs pointing to groups

Issue:
MIP/learnt IPs (both local and remote) programmed in FIB
(table-21) were pointing to load balancing groups rather
than redirecting to table-220. Only extra routes
(in table 21) need to be pointed to the group.

Fix:
Adding a check to enter setupLoadBalancingNextHop if
it is a static route

Also, the logic for removeAdjacencyFromInternalVpn method
is changed for the deletion of extra-route and nexthop.

Change-Id: Ie2aa43fb3180c032a609cba4fa39ac20f3a5b003
Signed-off-by: eswanit <swati.udhavrao.niture@ericsson.com>
5 years agoReduce info logging in VpnUtils.getRts 20/78320/2
Tom Pantelis [Fri, 30 Nov 2018 14:22:43 +0000 (09:22 -0500)]
Reduce info logging in VpnUtils.getRts

The JFR trace in ODLPARENT-176 shows VpnUtil.getRts is a heavy
hitter so reduce the info logging to debug.

Change-Id: Iefe9d7980cf6614dabca442bf786c8c843b65697
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoBump to mdsal-3.0.2 53/78153/3
Robert Varga [Mon, 26 Nov 2018 09:34:32 +0000 (10:34 +0100)]
Bump to mdsal-3.0.2

This bumps mdsal to 3.0.2.

Change-Id: I53577129dcca35524245fc2e5c0e6f4eb527418d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove irrelevant sections from COE spec 71/77971/2
Faseela K [Tue, 20 Nov 2018 09:30:57 +0000 (15:00 +0530)]
Remove irrelevant sections from COE spec

Some of the initial design proposals were changed
during the implementation phase, making
respective edits to the spec to align to the
same.

Change-Id: Ib3d9d0f688b121a883558c3dca66e0b4c7191a43
Signed-off-by: Faseela K <faseela.k@ericsson.com>
5 years agoReduce liblldp usage 16/78216/2
Stephen Kitt [Tue, 27 Nov 2018 16:13:10 +0000 (17:13 +0100)]
Reduce liblldp usage

We can use Byte.SIZE instead of NetUtils.NUM_BITS_IN_A_BYTE.

Change-Id: Ieb3ab819d137c1a70087181f68dd4787fa0d1e2b
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoCOE : Use cluster-id instead of namespace 48/78048/4
Faseela K [Thu, 22 Nov 2018 13:16:01 +0000 (18:46 +0530)]
COE : Use cluster-id instead of namespace

cluster-id is the unique id for a k8s cluster,
and all pods in a cluster should be able to communicate
to each other.

JIRA: COE-19

Change-Id: I13375049814d39a2e45503d99b5912ec404f0fee
Signed-off-by: Faseela K <faseela.k@ericsson.com>
5 years agoDo not unbox Boolean 43/77943/3
Robert Varga [Mon, 19 Nov 2018 12:41:55 +0000 (13:41 +0100)]
Do not unbox Boolean

This variable is a simple boolean returned, use simple true/false
to modify it.

Change-Id: I3c65b08484c61018973b983922b28e85d146d20d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMake VpnUtil.getVpnListForVpnInterface() static 42/77942/2
Robert Varga [Mon, 19 Nov 2018 12:40:54 +0000 (13:40 +0100)]
Make VpnUtil.getVpnListForVpnInterface() static

This method is not touching any state, make it static and adjust
the sole caller.

Change-Id: I44ab35b0a7b3419663d516d817a549e72a62e0c8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMake VpnUtil.isDualRouterVpnUpdate() static 41/77941/2
Robert Varga [Mon, 19 Nov 2018 12:38:48 +0000 (13:38 +0100)]
Make VpnUtil.isDualRouterVpnUpdate() static

This method does not touch any state, make it static and update
its sole caller.

Change-Id: I52211fc3f3636ffe0d3cfac2ce024f39364b614e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not use String.split() in VpnUtil 23/77923/3
Robert Varga [Sun, 18 Nov 2018 21:46:38 +0000 (22:46 +0100)]
Do not use String.split() in VpnUtil

Rather than compiling regexes and allocating String[]s, use a simple
indexOf() and substring getter to implement almost equivalent
functionality. This breaks on malformed inputs, like 1.2.3.4//24, but
that should be fine.

Change-Id: I1cb294abb3f17c84d332f8075f84e62c1dea86a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoNETVIRT-1501: ACL: Used Batched transactions 24/78024/2
Shashidhar Raja [Tue, 13 Nov 2018 13:46:48 +0000 (19:16 +0530)]
NETVIRT-1501: ACL: Used Batched transactions

Currently, each ACL flow is configured in a separate transaction.
With the updated changes, flows programmed are batched to fewer
transactions. This will reduce number of transactions used
significantly to program same set of flows.

Change-Id: I8b4192b3b2d362102a2b297da1a6098f9321424c
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
5 years agoAcl cache not updated 90/76890/9
Aswin Suryanarayanan [Thu, 11 Oct 2018 16:14:34 +0000 (21:44 +0530)]
Acl cache not updated

The ACL cache is not updated when AAP changes.

Changes are made to update the cache when an AAP is added or removed.

NETVIRT-1458  Security Group rules dropping IPv6 traffic for any new
subnets that are added to the network.

Fixed issues with IPv6 Unit tests.

Change-Id: Ic0a15ad0c68e5aff9d816442fc32e81abeaa4a83
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
5 years agoUse anyMatch to search routerIds 28/77728/5
Robert Varga [Tue, 13 Nov 2018 14:40:01 +0000 (15:40 +0100)]
Use anyMatch to search routerIds

Full materialization is completely unnecessary and very wasteful,
just use anyMatch(), terminating search as soon as a match is
found. This should halve (on average) the memory overhead.

Change-Id: Ibc28ef9666360efa09707f6193178d16f49c8f74
JIRA: NETVIRT-1503
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCache DataTreeModification.getDataAfter() 25/77825/2
Robert Varga [Wed, 14 Nov 2018 21:34:43 +0000 (22:34 +0100)]
Cache DataTreeModification.getDataAfter()

Invoking this method is quite costly in case of
LazyDataTreeModification, so cache the returned value, preventing
a potentially-costly operation.

Change-Id: Ibb3169fe77b0d6d2f11dae244a1fe110c37b659e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix Infinite loop in addVpnInterface 65/77765/2
Vishal Thapar [Wed, 14 Nov 2018 07:28:43 +0000 (12:58 +0530)]
Fix Infinite loop in addVpnInterface

add VPNInterface logic in VpnInterfaceManager
has a bug where if add VPN Interface fails, it keeps
retrying till it succeeds. There is no delay in retries.
IF there are any DS issues, this results in an infinite
loop which ties up a DJC thread and fills logs with same
msg repeatedly at a near instant rate.

Bug is in logic where onFailure() method adds the failed
interface back to retry. So while DJC does give up after
5 retries, since we've added it back to the queue
subsequent attempts start soon after.

This also fixes a copy-paste log msg which made it
difficult to troubleshoot where the error log
was repeating from.

Change-Id: I97c73dc879aaa4e1a4b3489e146d1a9337b62810
Signed-off-by: Vishal Thapar <vthapar@redhat.com>
5 years agoFix race condition between SNAT group & flow 57/77257/6
Jaime Caamaño Ruiz [Wed, 24 Oct 2018 14:34:26 +0000 (16:34 +0200)]
Fix race condition between SNAT group & flow

JIRA: NETVIRT-1474
Change-Id: I81add31b2f20edccda28d1f7516a655466b38ca2
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
5 years agoFix NPE in NatUtil 22/77622/1
Sam Hague [Thu, 8 Nov 2018 13:40:54 +0000 (08:40 -0500)]
Fix NPE in NatUtil

Change-Id: I42fd678f5e13c6f2f392bf48eddcd65fca3c9c65
Signed-off-by: Sam Hague <shague@redhat.com>
5 years agoClean up Xtend imports 44/77344/3
Stephen Kitt [Tue, 30 Oct 2018 14:25:21 +0000 (15:25 +0100)]
Clean up Xtend imports

Change-Id: I7886868ad187c7366db6987aba40f67c75f2b161
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoAdd missing fields in expected Flow instances 43/77343/2
Stephen Kitt [Tue, 30 Oct 2018 13:39:54 +0000 (14:39 +0100)]
Add missing fields in expected Flow instances

Flow objects have barrier, installHw and strict fields which need to
be initialised.

Change-Id: Ie4d6d673c83a5861d2864b240ad7054da2198117
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoRate limit for IPv6 NS punt packets. 85/77185/7
Somashekar Byrappa [Tue, 23 Oct 2018 06:53:08 +0000 (12:23 +0530)]
Rate limit for IPv6 NS punt packets.

+ NS punt controller flow is updated with learn action which adds NS
  drop flow per port for a specific ND target.
+ The drop flow will have higher priority (60) than the punt controller
  flow (50) to make sure subsequent NS packets from the same port and
  for same ND target is dropped till the hard_timeout value (10 secs).
+ The drop flow will match on LPORT tag metadata and ND target to make
  sure it drops NS packets per port and for same ND target.

"cookie=0x4000000, duration=0.100s, table=45, n_packets=0, n_bytes=0,
  hard_timeout=10, priority=60,icmp6,
  metadata=0x60000000000/0xfffff0000000000,icmp_type=135,icmp_code=0,
  nd_target=fe80::f816:3eff:fe45:ad28 actions=drop"

"cookie=0x4000000, duration=219.531s, table=45, n_packets=0, n_bytes=0,
  priority=50,icmp6,metadata=0x138a000000/0xffff000000,icmp_type=135,
  icmp_code=0,nd_target=2001:db8:0:2::1 actions=controller:65535,
  learn(table=45,hard_timeout=10,priority=60,cookie=0x4000000,
  eth_type=0x86dd,nw_proto=58,icmpv6_type=135,nxm_nx_icmpv6_code[],
  oxm_of_metadata[40..59],nxm_nx_nd_target[])"

"cookie=0x4000000, duration=219.531s, table=45, n_packets=1,
  n_bytes=86, priority=50,icmp6,metadata=0x138a000000/0xffff000000,
  icmp_type=135,icmp_code=0,nd_target=fe80::f816:3eff:fe45:ad28
  actions=controller:65535,learn(table=45,hard_timeout=10,priority=60,
  cookie=0x4000000,eth_type=0x86dd,nw_proto=58,icmpv6_type=135,
  nxm_nx_icmpv6_code[],oxm_of_metadata[40..59],nxm_nx_nd_target[])"

Change-Id: If410a56477e5dc4602e78a365faa5a32dc1d241d
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
5 years agoUpgrade to the Neon base platform 76/76476/18
Sam Hague [Thu, 4 Oct 2018 14:26:55 +0000 (10:26 -0400)]
Upgrade to the Neon base platform

This also includes changes for OSGI-INF.

A few tests had to be disabled; see
elanmanager/impl/src/test/java/org/opendaylight/netvirt/elanmanager/tests/ElanServiceTest.java
and
sfc/classifier/impl/src/test/java/org/opendaylight/netvirt/sfc/classifier/providers/GeniusProviderTest.java

Change-Id: If44b957bac6a7cd352b84140bac0123ddb256704
Signed-off-by: Sam Hague <shague@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoStale flows in ACL tables 216/246 46/77246/2
Somashekar Byrappa [Wed, 24 Oct 2018 07:13:35 +0000 (12:43 +0530)]
Stale flows in ACL tables 216/246

Issue:
------
Stale flows with VM IP's are observed in ACL tables 216/246 when a VM
is deleted which was having SG with --remote-group rules.

Solution:
---------
The issue is due to race-conditions.
Processing VM deletion is handled via DJC where-as deletion of
AclInterface from cache is not. This was resulting in stale flows.
Now, DJC with same key (ACL-ID) is used even for deletion of
AclInterface from cache which will sequence the operations.

JIRA: NETVIRT-1469

Change-Id: I315831b62a2ac5954fa4177a755c828a1f43d476
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
5 years agoHandle nullable lists in sfc 59/77259/2
Stephen Kitt [Wed, 24 Oct 2018 15:18:23 +0000 (17:18 +0200)]
Handle nullable lists in sfc

Following YANGTOOLS-585, lists can be null (which is correctly
indicated with an @Nullable annotation). This patch deals with the
fallout.

This adds a couple of utility classes which will be deleted as soon as
we upgrade to the MRI release of mdsal.

Change-Id: I1af1362d6b812cf07ae90564037d6afe81cd610e
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoHandle nullable lists in ipv6service 54/77254/2
Stephen Kitt [Wed, 24 Oct 2018 14:08:46 +0000 (16:08 +0200)]
Handle nullable lists in ipv6service

Following YANGTOOLS-585, lists can be null (which is correctly
indicated with an @Nullable annotation). This patch deals with the
fallout.

Change-Id: Ibcc5c076574992e522dfa9f40947615c9a717618
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoHandle nullable lists in qosservice 55/77255/2
Stephen Kitt [Wed, 24 Oct 2018 14:27:42 +0000 (16:27 +0200)]
Handle nullable lists in qosservice

Following YANGTOOLS-585, lists can be null (which is correctly
indicated with an @Nullable annotation). This patch deals with the
fallout.

Change-Id: Id613950a2c9e0ffb376d8c45b75edbd51cb385bb
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoRemove an unnecessary aclservice transaction 42/76242/4
Stephen Kitt [Wed, 19 Sep 2018 09:08:23 +0000 (11:08 +0200)]
Remove an unnecessary aclservice transaction

Change-Id: Ie0eaa36ce4b934136fdcb7e828632fea010f2609
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoTraffic not flowing after delete and add TEP 04/76604/4
Somashekar Byrappa [Wed, 3 Oct 2018 11:44:03 +0000 (17:14 +0530)]
Traffic not flowing after delete and add TEP

Two issues are addressed in this patch:

Issue-1:
-------
During controller restart, while processing onSubnetAddedToVpn,
VpnInstanceOpData was not populated due to race conditions. Due to
this, further processing breaks.

Solution-1:
-----------
VpnOpDataSyncer is used to wait for VpnInstanceOpData to be available
during processing of onSubnetAddedToVpn.

Issue-2:
-------
After controller restart, LearntIp adjacencies were lost for
VpnInterfaces because of out of order events. When VpnInterface-add
event comes first followed by Neutron port event, it was not
populating learnt IPs in the adjacency list. Hence the remote groups
refered by table 21 flows related to LearntIps were not updated during
TEP delete/add. It would remain as stale. It was resulting in traffic
loss.

Solution-2:
-----------
After controller restart, LearntIp adjacencies are populated back for
VpnInterfaces.

JIRA: NETVIRT-1356

Change-Id: If21ebf1d330ae3f2970c8fedafb0422cc4d38bdc
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
5 years agoHandle VPN Instance Update for dual router case 73/76473/11
Karthikeyan Krishnan [Thu, 27 Sep 2018 08:53:22 +0000 (14:23 +0530)]
Handle VPN Instance Update for dual router case

Problem:
========
VPN Instance update is not properly handled for
dual router use case where single vpn interface
is part of two router. This configuration is
existing in the dual stack network where V4
subnet is part of one router and V6 subnet is
part of different router.

Solution:
============
This patch is addressing the following VPN instance update
scenario.

+1st VPN Instance : router VPN or external BGP-VPN-1.
+2nd VPN Instance : router VPN or external BGP-VPN-2.
+3rd VPN Instance : Internet BGP-VPN(router-gw update/delete) for public
network access.

Issue: NETVIRT-1394

Change-Id: If489d9537a96fd4139d589b14f7a204a91515e00
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
5 years agoRate limit for IPv6 RS punt packets. 34/76934/5
Somashekar Byrappa [Fri, 12 Oct 2018 11:54:46 +0000 (17:24 +0530)]
Rate limit for IPv6 RS punt packets.

+ RS punt controller flow is updated with learn action which adds drop
  RS flow per port.
+ The drop flow will have higher priority (60) than the punt controller
  flow (50) to make sure subsequent RS packets for the same port is
  dropped till the hard_timeout value (10 secs).
+ The drop flow will match metadata on LPORT tag to make sure it drops
  RS packets per port.

 "cookie=0x4000000, duration=3.379s, table=45, n_packets=0, n_bytes=0,
   hard_timeout=10, priority=60,
   icmp6,metadata=0x50000000000/0xfffff0000000000,icmp_type=133,
   icmp_code=0 actions=drop"

 "cookie=0x4000000, duration=1.413s, table=45, n_packets=0, n_bytes=0,
   hard_timeout=10, priority=60,icmp6,
   metadata=0x70000000000/0xfffff0000000000,icmp_type=133,icmp_code=0
   actions=drop"

 "cookie=0x4000000, duration=11367.920s, table=45, n_packets=10,
   n_bytes=700, priority=50,icmp6,metadata=0x1389000000/0xffff000000,
   icmp_type=133,icmp_code=0 actions=CONTROLLER:65535,learn(table=45,
   hard_timeout=10,priority=60,cookie=0x4000000,eth_type=0x86dd,
   nw_proto=58,icmpv6_type=133,icmpv6_code=0,OXM_OF_METADATA[40..59])"

Depends-On: https://git.opendaylight.org/gerrit/#/c/76922/

Change-Id: I4a6ec6e5d3b87722f6b722f38410f4acd7a77db3
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
5 years agoUse multiple threads during flow programming 95/76795/2
Shashidhar Raja [Tue, 25 Sep 2018 10:20:09 +0000 (15:50 +0530)]
Use multiple threads during flow programming

Change-Id: I86448f92c831bbf1ad142138c007d3e009361e02
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
5 years agoHandle nullable lists in fibmanager 52/77152/3
Stephen Kitt [Mon, 15 Oct 2018 15:47:42 +0000 (17:47 +0200)]
Handle nullable lists in fibmanager

Following YANGTOOLS-585, lists can be null (which is correctly
indicated with an @Nullable annotation). This patch deals with the
fallout.

Change-Id: Ie4d6d34c5b0449c41ce21cfac31546d8faba019e
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoHandle nullable lists in vpnmanager 82/77082/4
Stephen Kitt [Mon, 15 Oct 2018 15:47:28 +0000 (17:47 +0200)]
Handle nullable lists in vpnmanager

Following YANGTOOLS-585, lists can be null (which is correctly
indicated with an @Nullable annotation). This patch deals with the
fallout.

Change-Id: I9b8bbfb69dff9af5334b7f6c57dbfc6348d68acb
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoHandle nullable lists in dhcpservice 51/77151/2
Stephen Kitt [Fri, 19 Oct 2018 15:50:42 +0000 (17:50 +0200)]
Handle nullable lists in dhcpservice

Following YANGTOOLS-585, lists can be null (which is correctly
indicated with an @Nullable annotation). This patch deals with the
fallout.

Change-Id: I8d41474f9340f91b61420c706e56963597192158
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoEnsure adjacencies are created with a transaction 78/77078/2
Stephen Kitt [Thu, 18 Oct 2018 14:01:25 +0000 (16:01 +0200)]
Ensure adjacencies are created with a transaction

It’s possible for addNewAdjToVpnInterface() to end up being called
with a null inventory transaction, which will cause pain once we get
to Genius. This patch fixes that (re-using the configuration
transaction in a couple of cases).

Change-Id: Ic84573cf575fe4b75cb22dffd8b37dac3f5e3aee
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoHandle nullable lists in elanmanager 68/77068/2
Stephen Kitt [Tue, 16 Oct 2018 14:52:09 +0000 (16:52 +0200)]
Handle nullable lists in elanmanager

Following YANGTOOLS-585, lists can be null (which is correctly
indicated with an @Nullable annotation). This patch deals with the
fallout.

Change-Id: I50cddb975389da42dc85bac65724576741cf6a5b
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoMdsalApiManager cleanup - elanmanager 73/76173/4
Stephen Kitt [Mon, 17 Sep 2018 13:14:36 +0000 (15:14 +0200)]
MdsalApiManager cleanup - elanmanager

This removes all calls to deprecated methods in MdsalManager, so that
they can be removed in the near future.

Change-Id: I11c363097e0a667cba4e7ca52e5691d28ea9800c
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoDrop Xtend Equinox Common overrides 57/76657/3
Stephen Kitt [Thu, 4 Oct 2018 16:52:07 +0000 (18:52 +0200)]
Drop Xtend Equinox Common overrides

These are no longer necessary and make it harder than it should be to
upgrade Xtend in odlparent.

Change-Id: I73f74e3254ab9f14dc3ca212486babfbbd7778cb
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoUpdate docs header to Neon on master 83/76883/2
Daniel Farrell [Thu, 11 Oct 2018 14:50:30 +0000 (14:50 +0000)]
Update docs header to Neon on master

This version name gets rendered into the main header of NetVirt's docs.

Now that these docs have moved from the docs repo to project-owned
repos, projects need to update this version themselves.

Should be Neon on master and Fluorine on stable/fluorine.

Change-Id: I090be766e00f64f83c865812027ac5ea63a86071
Jira: DOCS-112
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
5 years agoVPNv6 external network support for multiple router 00/76600/21
Karthikeyan Krishnan [Wed, 3 Oct 2018 09:41:24 +0000 (15:11 +0530)]
VPNv6 external network support for multiple router

Issue:
=======
1) Single external network/internet(public) is
sharing to more than one router is not
working as expected for IPv6 internet data traffic.

2) Before spawning the VM on the compute, internet
access was set/enabled with router already. In this
case if boot the VM on the new DPN, default V6 internet
fallback rule is not getting programmed.

Solution:
=========
RCA for issue (1):
------------------
 IPv6 internet default fall back rule(21->21) is
 not getting programmed for if external network is
 associated with more than one router due to flow-id
 is not proper for each router.

RCA for issue (2):
------------------
 When first/last VM is booted/removed from the DPN,
 there is no check for whether router is already
 been set with external/internet connectivity via
 router-gw set as a result V6 internet default
 fallback rule is missing for newly added DPN.

As part of this fix, internet default fall back rule
flow-id is constrcted based on the router-id always.
Since we can not go with either external-vpn(router)
or internet bgp-vpn.

Also addressed the issue (2) problem as well.

NAT Module Dependency:
=======================
+ RouterDpnChangeListener --> Program and un-program
the V6 internet default fallback flows on when first
VM is booted on the compute or last VM is removed from
the compute for router VPN

Issue: NETVIRT-1440

Change-Id: I2e20158368984172117597e32a5310477ad57d16
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
5 years agoHandle nullable lists in natservice 19/77019/4
Stephen Kitt [Mon, 15 Oct 2018 15:46:55 +0000 (17:46 +0200)]
Handle nullable lists in natservice

Following YANGTOOLS-585, lists can be null (which is correctly
indicated with an @Nullable annotation). This patch deals with the
fallout.

Change-Id: I7724304822d4088e9c8a149cbbddae071a88ce1f
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoHandle nullable lists in neutronvpn 30/77030/2
Stephen Kitt [Tue, 16 Oct 2018 08:40:44 +0000 (10:40 +0200)]
Handle nullable lists in neutronvpn

Following YANGTOOLS-585, lists can be null (which is correctly
indicated with an @Nullable annotation). This patch deals with the
fallout.

Change-Id: I8b730d8b7af405cf430534c90d3fb0990c32850d
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoNETVIRT-1439 : Delete L3VPN cleanup failure. 88/76488/7
Achuth Maniyedath [Wed, 12 Sep 2018 12:33:15 +0000 (18:03 +0530)]
NETVIRT-1439 : Delete L3VPN cleanup failure.

After running clean script seeing stray fib and vpn configs.

A recent fix to handle cleanup of external PNF flows had broken
footprint cleanup of all other types of FIB entries. This fix made
use of the parentVpnRd attribute in VrfEntry to check for the
footprint of external subnet where the PNFs are discovered (Since,
the footprint/interfaces for that external subnet is maintained in
the VPN of its external network). The parentVpnRf points to this
external network.

The above mentioned fix broke cleanup of existing FIBs since no
other non-PNF fibs will hve their parentVPnRd set.

SO, this fix considers the primaryRd if parentVpnRd is not set.

Change-Id: I3a6f216e9f9cfa6bc6fe1dc8fa7e95b958ebd1b7
Signed-off-by: Kiran N Upadhyaya <kiran.n.upadhyaya@ericsson.com>
Signed-off-by: Achuth Maniyedath <achuth.maniyedath@gmail.com>
Signed-off-by: Achuth <achuth.maniyedath@gmail.com>
5 years agoHandle nullable lists in aclservice 93/76993/3
Stephen Kitt [Mon, 15 Oct 2018 13:26:32 +0000 (15:26 +0200)]
Handle nullable lists in aclservice

Following YANGTOOLS-585, lists can be null (which is correctly
indicated with an @Nullable annotation). This patch deals with the
fallout.

Change-Id: Ie38fb51625d299a825deb883440f9e6658e96b90
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoFIP PNF access from another node 47/76847/5
Josh [Thu, 11 Oct 2018 08:07:36 +0000 (11:07 +0300)]
FIP PNF access from another node

A recent change [0] adds support for nodes that do
not have provider mappings. This patch fixes an issue
where if the traffic headed for the external network
is FIP'ed the controller can not send an ARP for the
destination address (and throws an excpetion) because
the code that looks for the router assumes the src
address is identical to the router's external IP.
See the comment in the code.

[0] https://git.opendaylight.org/gerrit/#/c/75570/

Change-Id: I02765b6309ab0ee55700394f5474ce8eb545b71d
Signed-off-by: Josh <jhershbe@redhat.com>
5 years agoDon't check net type for empty adj list 87/76987/2
Josh [Mon, 15 Oct 2018 09:13:44 +0000 (12:13 +0300)]
Don't check net type for empty adj list

The code previously assumed that if the
list was present it would not be empty
resulting in the flawed conclusion that
the non-existant adjacency is of the
wrong IP version ;-)

Change-Id: I5ff8c4fc54a637cc02a3fe18e7c522183c869274
Signed-off-by: Josh <jhershbe@redhat.com>
5 years agoFix primaryRd issue with VpnInstance Update 48/76948/1
Karthikeyan Krishnan [Fri, 12 Oct 2018 16:09:30 +0000 (21:39 +0530)]
Fix primaryRd issue with VpnInstance Update

This review is address the problem of primary
Rd value set in VpnInstance Update with
list of new Rds.

Issue: NETVIRT-1416

Change-Id: Idaf4be8515be96fd6c2e9edf115bcb0a7043ff6f
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
5 years agoEnsure External Connectivity for NAPT Switch 70/75570/23
Aswin Suryanarayanan [Thu, 30 Aug 2018 14:27:58 +0000 (19:57 +0530)]
Ensure External Connectivity for NAPT Switch

Currently, Netvirt code assumes that all the Compute Nodes in the
deployment have external network connectivity (via provider mappings).
However, we could have a deployment scenario where provider mappings
are configured on only few compute nodes. In such a deployment, SNAT
and FIP use-cases for FLAT/VLAN provider networks have to be
appropriately handled.

This patch does the following.
1. NAPT Switch will be scheduled only on the Compute Nodes that have
   the external network connectivity.
2. For a VM with Floating ip, if the compute node (hosting the VM)
   does not have the provider mappings (for external network), traffic
   would be routed from the Compute Node to the NAPT Switch (which is
   selected based on the provider-mappings) and then sent out to the
   External network using the floatingip.
3. When SNAT is disabled on a router only the flows related to NAPT is
removed. The centralized switch is not released and the flows in to send
the packet to the centralized switch and vice versa is retained.

Change-Id: I5908f44cfbdbc74c9a8ee1218931fed9297e65a9
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
(cherry picked from commit 8172c9796e5cba81ec78581f8ca66fefbf0a01e0)

5 years agoBGP-VPN Instance update with additional RD Support 83/75683/13
Karthikeyan Krishnan [Mon, 3 Sep 2018 13:36:11 +0000 (19:06 +0530)]
BGP-VPN Instance update with additional RD Support

Issue:
======
For Extra route use cases, user can update the existing
BGP-VPN instance with additional RDs which are required
for extra/static routes.
Currently RD list update is not getting updated in
VPN Instance DS. As a result newly added RD is not
getting advertised to BGP.

Solution:
==========
This fix is addressing the existing BGP-VPN instance
is getting update with new RDs.Also if extra routes
are used this newly added RD will advertise this VRF
into external BGP Update.

Note: Removing the existing RD is not supported by NeutronVPN

Issue: NETVIRT-1416

Change-Id: Iedcdba88084934670c7ba7e8fcf66e0bd91f875b
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
5 years agoIPv6: Replace yang notifications 22/76222/5
Somashekar Byrappa [Tue, 18 Sep 2018 14:04:12 +0000 (19:34 +0530)]
IPv6: Replace yang notifications

+ Replaced yang notifications with direct API call for reliability.
+ Removed duplicate code by replacing with Ipv6NaDecoder.
+ In ipv6-nd-util.yang, instead of "notification na-received",
  neighbor-advertise-packet is augmented with packet-metadata. The
  corresponding code has been updated.
+ This patch is dependent on Genius patch [0], hence it needs to be
  merged along with [0].

JIRA: NETVIRT-1434

[0] https://git.opendaylight.org/gerrit/#/c/76221/

Change-Id: Ib29c36a4a80f920729f69facd67bd5e78b3b6329
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
5 years agoNetvirt changes for rename of ether-types 72/76272/3
Somashekar Byrappa [Wed, 19 Sep 2018 14:21:15 +0000 (19:51 +0530)]
Netvirt changes for rename of ether-types

+ Genius patch [0] handles renaming of ether-types to
  monitor-protocol-type in aliveness-monitor.yang. Corresponding
  Netvirt changes are done in this patch.

This patch needs to be merged along with [0].

[0] https://git.opendaylight.org/gerrit/#/c/76271/

Change-Id: I72d9430df5abf730db0550e94163f65d3dc0b612
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
5 years agoFix for invisible IP ping failures 28/76628/2
eswanit [Thu, 4 Oct 2018 05:03:56 +0000 (10:33 +0530)]
Fix for invisible IP ping failures

Adding DJC to avoid missing flow entry
due to race condition between group and flow table
programming

Change-Id: Icd8dcb3d26cd221f457be8d0feae9980e1a1da3d
Signed-off-by: eswanit <swati.udhavrao.niture@ericsson.com>
5 years agoException on snatint-ip-port-map DS 66/74766/7
shaik [Thu, 2 Aug 2018 12:45:37 +0000 (18:15 +0530)]
Exception on snatint-ip-port-map DS

Description: Lot of conflict modification exception are observed on
the snatint-ip-port-map DS.

When multiple SNAT session gets establish from a given VM
simultanously, the snatint-ip-port-map DS gets updated simultanously
to update with allocated external ports for an given VM resulting in
exception.

Java synchronization is used to prevent simultanous modification
on this DS.

JIRA : NETVIRT-1391

Change-Id: Ib455b2cbab171440c77067f9d347346cdcda81f7
Signed-off-by: shaik <shaik.b@altencalsoftlabs.com>
5 years agoUse System.out for printing to console 43/76243/8
Loshmitha [Wed, 19 Sep 2018 09:49:33 +0000 (15:19 +0530)]
Use System.out for printing to console

Options to print to the console are not compatible so replacing them
with System.out

JIRA: NETVIRT-1436
Change-Id: I845f8fb422ba5478deec66abe1d3b8896f56c8b7
Signed-off-by: Loshmitha <loshmitha@ericsson.com>
5 years agoMdsalApiManager cleanup - aclservice 70/76170/5
Stephen Kitt [Mon, 17 Sep 2018 13:12:50 +0000 (15:12 +0200)]
MdsalApiManager cleanup - aclservice

This removes all calls to deprecated methods in MdsalManager, so that
they can be removed in the near future.

Change-Id: Ic4e5503be562b5d9fa008c3ff2b59ddf55760c3b
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoRemove duplicate flows 96/76396/2
Stephen Kitt [Sun, 23 Sep 2018 14:41:16 +0000 (16:41 +0200)]
Remove duplicate flows

Duplicate flows don’t reflect production usage; because flows are
keyed, such duplicates aren’t stored separately in the datastore.
With Id87cac5d78d271d6650a513cc8b03c3bd6c88c79 in Genius, flows are
de-duplicated, so we can clean up the flow definitions in NetVirt.

Change-Id: I7696e796e230335022806252a25d2cae9f678705
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoRead dpn ids from cache instead of reading DS 35/76235/3
Ankit Jain [Tue, 11 Sep 2018 06:52:51 +0000 (12:22 +0530)]
Read dpn ids from cache instead of reading DS

Description : It was observed that Dhcp is reading the entire
operational inventory-node datastore to get the list of dpn ids, which
is taking longer time.

Here fix is to cache dpn ids when nodes get connected and use the same.

Change-Id: Icd0040a5aa94f2be7db416231d715ae638386f56
Signed-off-by: Ankit Jain <ankit.j.jain@ericsson.com>
5 years agoTep delete changes for extra-route reachability 38/76238/2
eswanit [Wed, 19 Sep 2018 08:17:09 +0000 (13:47 +0530)]
Tep delete changes for extra-route reachability

NETVIRT-1422: Extraroute not reachable from DC-GW
to compute when tep is deleted on another compute

In setupLoadBalancingNextHop, logic to remove local group
was dependent on checking local bucket info as well as
remote bucket info wherein we used to remove local group
if there is no local bucket info or no remote bucket info.

However, when TEP is deleted for one of the nodes,
table 20 entry pointing to local ECMP group was
getting deleted on all the nodes becasue of above
logic due to which traffic is lost for the rest of
the nodes.

So changing this logic to remove local group
only if local bucket info is empty.

Change-Id: I3cc496746b620a6b695f6244dfaa3fc2fec4b808
Signed-off-by: eswanit <swati.udhavrao.niture@ericsson.com>