netvirt.git
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>
5 years agoInternet BGPVPN traffic is not working for IPv6 18/76218/11
Karthikeyan Krishnan [Tue, 18 Sep 2018 12:44:38 +0000 (18:14 +0530)]
Internet BGPVPN traffic is not working for IPv6

This patch is addressing the review comments
from the existing review[0]

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

Issue: NETVIRT-1417

Change-Id: I8ea264ad2f8a284f4471e7b4eed67086e23a460b
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
5 years agoAvoid Non-VPN Interface Adj IP Learning 93/76293/4
Karthikeyan Krishnan [Thu, 20 Sep 2018 05:08:11 +0000 (10:38 +0530)]
Avoid Non-VPN Interface Adj IP Learning

This review is addresing the review comments
from the existing merged review[0]

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

Issue: NETVIRT-1171

Change-Id: I60bbcefd25b863305b28d81f0843ce29c655399f
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
5 years agoSpec for Fip support for Octavia Vips 32/76132/4
Josh [Mon, 17 Sep 2018 06:09:09 +0000 (09:09 +0300)]
Spec for Fip support for Octavia Vips

Jira: NETVIRT-1402

Change-Id: I2dedfe8a349f894f491e89879a4c2460acb8725d
Signed-off-by: Josh <jhershbe@redhat.com>
Signed-off-by: Sam Hague <shague@redhat.com>
5 years agoOptimisticLockFailedException fix for IPv6 Serv 98/75398/8
Karthikeyan Krishnan [Thu, 23 Aug 2018 05:06:24 +0000 (10:36 +0530)]
OptimisticLockFailedException fix for IPv6 Serv

Issue:
=======
OptimisticLockFailedException is throwing for
when IPv6 host interface service binding and
unbinding scenario. In cluster environment
this issue was observed.

Solution:
=========
As pert of this fix, have introduced JC for
IPv6 service binding and unbinding for all
the basic add(), update(), remove() methods.
This kind of JC handling has implemented already
in all the southbound events. So the same kind
of handling is implemented for all the
northbound events.

Issue: NETVIRT-1409

Change-Id: Ice777d57913cda8924ec8422eb02bbbfdd194168
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
5 years agoFIP support for Octavia VIPs 81/75281/16
Josh [Fri, 17 Aug 2018 22:20:29 +0000 (15:20 -0700)]
FIP support for Octavia VIPs

This patch resolves the issue documented in the Jira
issue referenced below.

The basic solution is to use the OF packet-in event to
learn the dpn where the NAT flows need to be programmed.

Overview of code changes:
1. Refactor NatInterfaceStateChangeListener into two classes:
 - NatInterfaceStateChangeListener which just receives events
 - NatSouthboundEventHandlers which contains the logic invoked
   for when an interface state changes (or a garp is received)
2. Implementation of NatArpNotificationHandler which receives
   the garps and invokes the correct methods in
   NatSouthboundEventHandlers
3. neutron-vip-state yang model which is used together with
   VipStateTracker (DataObjectCache) to manage state of the
   discovered VIPs. This is required in cases where the
   associated Ocatavia Amphora VM changes to a different
   compute node. In this case the existing flows must be
   removed from the odl compute node.
4. Tweak VIP learning code to accept neutron ports that are
   owned by "Octavia", previously the code assumed no neutron
   port ever needed to be learned.

Jira: NETVIRT-1402

Change-Id: I7867124f3cbbe88d1ce6d075e51e2b11f941aec2
Signed-off-by: Josh <jhershbe@redhat.com>
5 years agoMdsalApiManager cleanup - dhcpservice 72/76172/3
Stephen Kitt [Mon, 17 Sep 2018 13:14:13 +0000 (15:14 +0200)]
MdsalApiManager cleanup - dhcpservice

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

Change-Id: I2e3f6d05a238973e9125624ac764b547a7d91f09
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agomove fluorine delayed specs to neon 92/76192/4
Sam Hague [Mon, 17 Sep 2018 17:45:44 +0000 (13:45 -0400)]
move fluorine delayed specs to neon

Change-Id: Ib1efa324d43ec4dfbc3ea22a50b686980a57562b
Signed-off-by: Sam Hague <shague@redhat.com>
5 years agoMdsalApiManager cleanup - coe 71/76171/2
Stephen Kitt [Mon, 17 Sep 2018 13:13:53 +0000 (15:13 +0200)]
MdsalApiManager cleanup - coe

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

Change-Id: I68c226022b95cf52f145a6685afbc8e51124108d
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoIPv6 FIB enteries not appearing if ExtNwt enabled 01/75601/9
Karthikeyan Krishnan [Fri, 31 Aug 2018 02:36:06 +0000 (08:06 +0530)]
IPv6 FIB enteries not appearing if ExtNwt enabled

Issue:
======
In dualstack networks, IPv6 FIB entries are not
appearing if router gateway is set with external
network. Due to this issue L3 connectivity across
IPv6 network is failing.

Solution:
==========
This fix is addressing the following use cases to
work properly for IPv6 Internet Connection in dual
stack network.

(1) IPv6 Subnet is added/removed from the External Router

(2) Internet BGP-VPN is getting associated/disassociated
from External Network

(3) External router is getting added/removed from external
network via router-gw set/clear

Dependency:
===========
This issue fix is dependent on review [0]

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

Issue: NETVIRT-1417

Change-Id: Ibfe6c3225810f4d82d5a58145df7ab1bf5a9f209
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
5 years agoHandle BGPVPN Instance Update/Swap Case Properly 57/75657/11
Karthikeyan Krishnan [Mon, 3 Sep 2018 00:18:23 +0000 (05:48 +0530)]
Handle BGPVPN Instance Update/Swap Case Properly

Issue:
======
Current implementation of the VPN Instance update
is always doing swap (Remove Old VPN Interface
and Add New VPN Interface) for when ever there
is an update with VPN Instance for existing VPN
interface.

This logic is suitable for only on Router is
getting associated/disassociated with
external BGP-VPN.

When Internet BGP-VPN is attached to router
all private IPv6 subnet routes needs to be
created with VPN interface onto Internet BGPVPN.

Single external BGP-VPN instance can be associated
to maximum two routers. This feature is supported
starting from fluorine release. This feature also
not working with current implementation.

Updating VPN Interface with second VPN Instance
should not consider the VPN Swap for Internet
BGP-VPN update and dual router use cases.

Solution:
==========
This fix addresses the following use cases
properly for BGP-VPN Instance update.

1) External BGP-VPN Instance is associated to
single router or disassociated from single router

2) Internet BGP-VPN Instance is attached to
single router(router-gw) for external public network
access or removed internet BGP-VPN instance from
single router.

IPv6 Internet/Public Data path traffic should work
along with review[0]

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

Issue: NETVIRT-1418

Change-Id: I71b495e0098d798c5a4ca51f395b0be67d51b2fe
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
5 years agoChanges to handle ReadFailedException properly 84/76084/2
Swati Udhavrao Niture [Fri, 14 Sep 2018 09:55:20 +0000 (15:25 +0530)]
Changes to handle ReadFailedException properly

Minor change to fetch tunnel state and
handle ReadFailedException for ECMP UCs

Change-Id: Ide4ae0f749b5e05fb0c0660a1bf243b1c32228b2
Signed-off-by: Swati Udhavrao Niture <swati.udhavrao.niture@ericsson.com>
5 years agoUse BgpConfigurationManager instead of BgpManager 96/68996/8
Stephen Kitt [Fri, 2 Mar 2018 10:15:57 +0000 (11:15 +0100)]
Use BgpConfigurationManager instead of BgpManager

Most of BgpManager’s methods are delegations to
BgpConfigurationManager, which can be replaced by direct calls to
BgpConfigurationManager. This patch implements as many replacements as
are viable, within bgpmanager.

Change-Id: Id4b42b4ce6bd50dcb44482f4e5dd4cc9d1ecaf8c
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoUse a single function instead of duplicating code 58/72258/3
Stephen Kitt [Fri, 25 May 2018 09:21:31 +0000 (11:21 +0200)]
Use a single function instead of duplicating code

This is a reworked version of
I7d7c2125582dceca9ad04778a9399745e48df349

Change-Id: I8a4b4f5ec469097d4aa562a52b1d22bc37222ab7
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agocoe dead code removal 04/75404/2
Stephen Kitt [Thu, 23 Aug 2018 07:44:55 +0000 (09:44 +0200)]
coe dead code removal

This patch removes unused methods and fields.

Change-Id: I7d48f4bda57ed510a2b0fff9f5d656df3a09a65a
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoaclservice dead code removal 86/75386/4
Stephen Kitt [Wed, 22 Aug 2018 18:02:56 +0000 (20:02 +0200)]
aclservice dead code removal

This patch removes unused methods and classes.

Change-Id: Ife48d8574e75e537b94ce9e710cae09286e582db
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoDatastore-constrained txes: vpnmanager 20/74020/5
Stephen Kitt [Fri, 13 Jul 2018 09:25:53 +0000 (11:25 +0200)]
Datastore-constrained txes: vpnmanager

Change-Id: I4d0c66ddb953e7c90f2c9e064c34a1a0feedcd04
JIRA: NETVIRT-1346
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoVPNInstance IP Addr Family update is not working 32/75432/13
Karthikeyan Krishnan [Thu, 23 Aug 2018 18:42:25 +0000 (00:12 +0530)]
VPNInstance IP Addr Family update is not working

Issue:
======
When router is getting associated with BGP-VPN(External BGP-VPN)
the corresponding external BGP-VPN
instance(odl-l3vpn:vpn-instance-op-data)
needs to be updated with IP address family based on the
attached subnets IP address family type either IPv4 or
IPv6 or both of them.

Currently updating the "vpn-instance-op-data" with
address family is not working as expected for some
times in odl cluster mode. (Sporadically this issue is happening)

If "vpn-instance-op-data" address family is not proper
then "ebgp:bgp" config data store also not proper as a
result address family (AFI/SAFI) is missing either IPv4
or IPv6 in ebgp data store in dual stack network use cases.

Solution:
============
As part of this issue fix reading "vpn-instance-op-data"
is avoided completely for updating VPN instance address family.
Since every time read and write into the DS is leading the
problem for dual stack network use cases.

So decided to re-implement the different approach of updating
the VPN Instance Op Data for address family. This will solve
race-condition between VPN Instance Op Data read and write.

Issue: NETVIRT-1410

Change-Id: I9dda8beeb74aaa273db800964b5e741478db36a3
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
5 years agoneutron-vpn-portip-port-data d.s not cleared 02/75402/11
nithi thomas [Thu, 23 Aug 2018 06:16:49 +0000 (11:46 +0530)]
neutron-vpn-portip-port-data d.s not cleared

Issue:
======
Stale entry not removed for neutron-vpn-portip-port-data .
neutron-vpn-portip-port-data d.s has ODL based dhcp-port entry which is
not getting cleared after router is attached to BGP-VPN and then all the
configs are deleted.

Analysis:
=========
   The root-cause is all the retrieval of port list is done from
subnet-map. Dhcp port with device_id as ODL is wrongly getting added to
one of the subnet map in case of dual-stack. For eg, in case of
dual-stack if we create ipv4 subnet first the corresponding add() for
the port will be invoked and the check for blocking ODL_based dhcp port
is available. Then if we are creating ipv6 subnet corresponding update()
for the port is invoked where this check was missed out and that is why
ipv6 subnet map will have ODL based dhcp port entry in the port-list.
             All the looping for ip's is done thru subnetmap port list
where wrongly added ODL dhcp port also get's added. Added check in
update() to block dhcp interfaces with device_id as ODL.

Issue: NETVIRT-1406

Change-Id: Idaf6f43525655c4043f5cee7b32263cd9858e31c
Signed-off-by: nithi thomas <nithi.t@altencalsoftlabs.com>
5 years agoFix For NETVIRT-1389 57/74457/12
ananth [Wed, 25 Jul 2018 13:50:54 +0000 (22:50 +0900)]
Fix For NETVIRT-1389

Implemented flows for TCP and UDP source/destination
port-range matches. Port ranges are converted
to a masked values and a flow entry is added
for each such combination of TCP and UDP
source/destination ports.

Change-Id: I297deee3d64be9c82a63f4156dd6d1185a890f83
Signed-off-by: ananth <ananth.y@hcl.com>