netvirt.git
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>
5 years agoFixes for few NullPointerException 25/75825/5
Ankit Jain [Fri, 7 Sep 2018 06:55:01 +0000 (12:25 +0530)]
Fixes for few NullPointerException

Change-Id: I9164090262bb702607e90a9e53298f295120cd91
Signed-off-by: Ankit Jain <ankit.j.jain@ericsson.com>
5 years agoIssue: NETVIRT-1430 83/76083/3
Ravindra Thakur [Fri, 14 Sep 2018 09:43:12 +0000 (15:13 +0530)]
Issue: NETVIRT-1430

Packet counters for ARP traffic in same DPN, are incremented for GARP
in table 196 and 48 because of incorrect matching of arp request and
response flows.

Fix: Added arp_op also as match criteria for the learnt flows.

Change-Id: Ic6cbbbddeb1d6f008d499de651a10bb3c81a4f40
Signed-off-by: Ravindra Thakur <ravindra.nath.thakur@ericsson.com>
5 years agoRemove GPE requirement for SFC classifier 90/75990/2
Jaime Caamaño Ruiz [Tue, 11 Sep 2018 14:31:45 +0000 (16:31 +0200)]
Remove GPE requirement for SFC classifier

GPE is the canonical way to encapsulate NSH in VXLAN. But it can
be done without at the expense of the bandwidth wasted with a
useless Ethernet header which is a useful option for pre-existing
VXLAN meshes.

For the time being, SFC is not using GPE extension. And the plan
is to not make it a hard requirement but an option in the (near)
future. When the time comes, support both mechanisms.

Change-Id: I120f8a010e3b6e21a4371eef7e114ac53745f190
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
5 years agoECMP groups not deleted after extra-routes rm 15/74915/7
eswanit [Tue, 7 Aug 2018 12:11:22 +0000 (17:41 +0530)]
ECMP groups not deleted after extra-routes rm

ECMP groups are not deleted after extra-routes removal

* For the last extra-route in a remote DPN, group was not
  getting removed wherein the group-id was getting released in
  CleanupVpnInterfaceWorker previously.
  Now calling this inside deleteFibEntries so that all the groups
  are removed properly after extra-route removal in remote DPN.

* Making jobKey independent of usedRDs

* Migrating to SyncRemoveGroup from RemoveGroup

Change-Id: I2d3c5c528c51492a0f1ed0c1c8a735ae10937325
Signed-off-by: eswanit <swati.udhavrao.niture@ericsson.com>
5 years agoFix for ECMP Bucket missing on route update 00/74900/4
ashwinbc [Fri, 3 Aug 2018 09:51:19 +0000 (15:21 +0530)]
Fix for ECMP Bucket missing on route update

Description: Adding synchronization to prevent a race condition
between refreshFibEntry and VpnToExtraRoutes causes a missing
bucket action as the nexthop is missing in VpnToExtraRoutes.

Change-Id: I825d3dec4015fb2c7184ff8e3f15aea80f6c5e93
Signed-off-by: ashwinbc <ashwin.b.c@ericsson.com>
5 years agoswitch natservice upgrade config 22/75822/3
Michael Vorburger [Thu, 6 Sep 2018 23:22:34 +0000 (01:22 +0200)]
switch natservice upgrade config

from genius' Config to serviceutils' UpgradeConfig

Change-Id: I99ca9b80955e3b75d7c3903f0e49149d79a96733
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
5 years agoIPv4 entries appear in FIB though not asso to Rout 26/75226/5
Karthikeyan Krishnan [Thu, 16 Aug 2018 12:31:01 +0000 (18:01 +0530)]
IPv4 entries appear in FIB though not asso to Rout

Issue:
=======
IPv4 entries are appearing in FIB when subnet is
not associated to router in a dualstack network

Solution Description:
=====================
Dual Stack VM has both IPv4 and IPv6 Address,
IPv6 or IPv4 subnet only associated to router
means it should show only IPv6 or IPv4 address
based on the subnet address family.

Currently once ARP response message from the
dual-stack VM interface received to ArpNotificationHandler
it is checking in the VPN DS "vpn-portip-to-port" for
IPv4 address and it won't find any entries for IPv4 subnet
Since IPv4 subnet is not part of router.As a result it will
return empty result and this will be considering as a learning
of that interface port. Which is causing this problem.

As part of this fix have properly added the check
for whether IPv4 subnet is part of vpn or not.

Issue: NETVIRT-1171

Change-Id: I0e67343557ecc887f8c4d5397890c1ceaf069ad0
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
5 years agoswitch all UpgradeState users 89/75689/3
Michael Vorburger [Mon, 3 Sep 2018 14:43:29 +0000 (16:43 +0200)]
switch all UpgradeState users

from genius' to serviceutils' (identical) API

required by I9894bd65f7128d660f5294e14d86578b2c1b79ca which removes the
UpgradeState API from genius (@Deprecated in
I646b4a10abc6ef7aac531e76832e8a7d0f1356f7)

Change-Id: I3071746b4738cf3d790a3980b56b9492621f2c4d
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
5 years agoECMP Select group created for even 1 nexthop 13/74913/7
eceghkl [Thu, 19 Jul 2018 14:32:54 +0000 (20:02 +0530)]
ECMP Select group created for even 1 nexthop

* Earlier the behavior of programming group and flows for extra routes
  was different based on number of nexthops
* With this fix, behavior is made common. Select group is created always
  when an extra route is created. There is no change in functinality if
  nexthop is one or more.

Change-Id: I2557e275d2cdd8d7254d764693a7401d9ffb36f6
Signed-off-by: eceghkl <manu.b@ericsson.com>
Signed-off-by: eswanit <swati.udhavrao.niture@ericsson.com>
5 years agoDelete stale hidden IPs in FIB. 94/74394/17
Somashekar Byrappa [Tue, 24 Jul 2018 12:42:34 +0000 (18:12 +0530)]
Delete stale hidden IPs in FIB.

Issue:
------
When VM is deleted without port being deleted, learnt hidden IPs are
not removed from the adjacency list. When another VM with same port is
created, the learnt hidden IPs which existed in  the adjacency list
will result into programming these IPs in FIB.
This issue exists for both IPv4 and IPv6 addresses.

Fix:
----
Removed learnt hidden IPs from the adjacency list during
processVpnInterfaceDown().

JIRA: NETVIRT-1363

Change-Id: I606f49105c5eee5f76bbae908eb626d4ed346a23
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
5 years agoSupport for local and remote ECMP groups 96/74896/9
eceghkl [Sun, 15 Jul 2018 05:06:54 +0000 (10:36 +0530)]
Support for local and remote ECMP groups

* Table 20 and 36 used to point incorrectly. 20 used to point to ECMP
  select group which has remote buckets. 36 used to point to only one of
  the nexhop among the loadbalancing group
* Fix is added to create local and remote select groups
* Table 20 and 36 will point to local ECMP select group
* Table 21 will point to remote ECMP select group

Change-Id: I5f74b943d8158022cf56d6f7a89be6bc08069f5f
Signed-off-by: eceghkl <manu.b@ericsson.com>
5 years agoNETVIRT-1414: Multicast traffic is dropped in ACL 11/75511/2
Shashidhar Raja [Mon, 27 Aug 2018 13:36:54 +0000 (19:06 +0530)]
NETVIRT-1414: Multicast traffic is dropped in ACL

Multicast traffic should by-pass conntrack; but, -trk flow in tables
214/244 making it to pass through conntrack. This is resulting in
packet drops in ACL tables. Updated -trk flow to include conntrack
traffic type matches for other traffic (like multicast) to by-pass it.

Also, in table 214, -trk flow had wrong goto table action (goto table
was wrongly programmed as 242). This is also rectified with this
change.

Change-Id: I4bdbebae5b93c0581751fdb8c816c7d0eb85db95
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
5 years agoMinor change to fetch tunnel state for ECMP UCs 99/75399/8
eswanit [Thu, 23 Aug 2018 06:23:58 +0000 (11:53 +0530)]
Minor change to fetch tunnel state for ECMP UCs

Use an API to get tunnel state instead of
data-store read

Change-Id: I0075ff0c48b54903379635a27591e3eaf00543df
Signed-off-by: eswanit <swati.udhavrao.niture@ericsson.com>
5 years agoBGP Minor fixes 08/75308/2
Vyshakh Krishnan CH [Sun, 19 Aug 2018 11:14:34 +0000 (16:44 +0530)]
BGP Minor fixes

Fix to :

1. set more bits when lot of routes are synced from QBGP
2. handle entity owener ship correctly

Change-Id: If0297b665e3ddc4f835f437bb27173aa9750a154
Signed-off-by: Vyshakh Krishnan CH <vyshakh.krishnan.c.h@ericsson.com>
5 years agoAdd ARP Check Table in doc 05/75405/2
Faseela K [Thu, 23 Aug 2018 07:50:54 +0000 (13:20 +0530)]
Add ARP Check Table in doc

Change-Id: I6c26bba9cf875bba9cca8672d3ac87832392be62
Signed-off-by: Faseela K <faseela.k@ericsson.com>
5 years agoFix issue in natservice with IPv6 VxLAN tunnels 37/75237/3
Sridhar Gaddam [Thu, 16 Aug 2018 11:46:13 +0000 (17:16 +0530)]
Fix issue in natservice with IPv6 VxLAN tunnels

When using IPv6 VxLAN tunnels along with SNAT Conntrack mode,
we have seen that use-cases like SNAT and FIP are not working
due to an exception in natservice leading to some missing flows.
This patch fixes this issue.

Issue: NETVIRT-1401

Change-Id: I2c9ced7290ef488ecbfc485245a384fd95071dd6
Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
5 years agoDatastore-constrained txes: elanmanager 26/74026/8
Stephen Kitt [Fri, 13 Jul 2018 15:57:42 +0000 (17:57 +0200)]
Datastore-constrained txes: elanmanager

Change-Id: I92faf670c930604761fbe3506f20c1e5af7a9e21
JIRA: NETVIRT-1339
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoHandle exceptions in BgpRouteVrfEntryHandler 98/74898/3
eceghkl [Wed, 18 Jul 2018 05:47:53 +0000 (11:17 +0530)]
Handle exceptions in BgpRouteVrfEntryHandler

* Executor service is not handling any new task after the exception.
* Fix is added to handle the exception properly.
* Added more TRACE logs are added for data collection

Change-Id: I8496ec9d45cdf25288be5638a82610c7e2049f20
Signed-off-by: eceghkl <manu.b@ericsson.com>
5 years agoECMP code changes for handling itm-direct feature 99/74899/3
eceghkl [Wed, 18 Jul 2018 14:05:08 +0000 (19:35 +0530)]
ECMP code changes for handling itm-direct feature

* ECMP select group doesn't contain remote buckets
* Tunnel operstate was queried earlier from interface state
* Moving it to tunnel state from itm

Change-Id: Ic76db803359c07782f0551641a6ea277c6c58f3e
Signed-off-by: eceghkl <manu.b@ericsson.com>
5 years agoTroubleshoot netvirt datapath 08/74808/13
Faseela K [Fri, 3 Aug 2018 18:29:51 +0000 (23:59 +0530)]
Troubleshoot netvirt datapath

Adding a document which can help people debug
the netvirt datapath in case of any failures in the deployment.
This is a WIP, and requires inputs from all of the netvirt
contributors, so that we can have a detailed description
on making debugging easier.

Change-Id: Ic13b0df295ad69f996c58a81aa8189391e81158a
Signed-off-by: Faseela K <faseela.k@ericsson.com>
5 years agoRemove references to mdsal-model-artifacts 25/75125/1
Robert Varga [Sat, 11 Aug 2018 07:50:33 +0000 (09:50 +0200)]
Remove references to mdsal-model-artifacts

This artifact is going away, migrate to mdsal-artifacts.

Change-Id: Iba4e578bc59c298872c1ca98b25912a8b4aa0ce0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCOE external ip ping failure 22/74922/8
Faseela K [Tue, 7 Aug 2018 15:25:12 +0000 (20:55 +0530)]
COE external ip ping failure

JIRA: NETVIRT-1396

Change-Id: Ib2d1ce72f2382978b132aaeaab90e4156e9de98b
Signed-off-by: Faseela K <faseela.k@ericsson.com>
5 years agoBump versions by x.(y+1).z for next dev cycle 96/74996/1
Anil Belur [Thu, 9 Aug 2018 12:40:15 +0000 (18:10 +0530)]
Bump versions by x.(y+1).z for next dev cycle

Change-Id: Ia07cd2f52a89dab5e230cd56ba762eb28c3f3c87
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
5 years agoNAT failure due to Napt Switch-Over not happened 55/71655/14
xcheara [Mon, 23 Apr 2018 05:41:26 +0000 (11:11 +0530)]
NAT failure due to Napt Switch-Over not happened

Description :
Whenever a last VM part given VRF is deleted/migrated, it is required
to delete 'dpn-vpninterfaces-list' entry for given dpn-id from
'odl-l3vpn:neutron-router-dpns' Operational DS. This trigger
re-election of new Napt Switch which has VRF presence. But, when 2
VMs part of same VRF on a same DPN deleted simultaneously, then
there are chances that both of these event doesn't delete
'dpn-vpninterfaces-list' entry for the DPN which results in
non-triggering on new Napt Switch election. As a
result, the SNAT reverse traffic initiated from Non-Napt Switch
fail as FIB routes will not be available to carry back traffic
to non-napt switch.

Solution: Changes are done to make sure the 'dpn-vpninterfaces-list'
entry for DPN is deleted properly when last VM on that DPN is deleted
for a given VRF.

Issue : NETVIRT-1221

Change-Id: Idaebd8576762d12639d7bfbc26a89af94de4e991
Signed-off-by: xcheara <chetan.arakere@altencalsoftlabs.com>
5 years agoController based SNAT traffic fail after upgrade 97/72197/15
Shaik Zakir [Wed, 23 May 2018 13:02:52 +0000 (18:32 +0530)]
Controller based SNAT traffic fail after upgrade

Description: It's been observed certain below NAT config DS are not
populated properly during upgrade resulting in SNAT traffic failure.

1. ext-vpn missing in external-networks.
2. router-id-name data missing.

Changes are done to update the above NAT DS properly during upgrade.

Issue: NETVIRT-1280

Change-Id: Idfd1e4a44c646bedc15f0c3e24401418065feda0
Signed-off-by: shaik <shaik.b@altencalsoftlabs.com>
5 years ago21->26 flow missing for NAT use case 70/74770/1
shaik [Thu, 2 Aug 2018 14:55:26 +0000 (20:25 +0530)]
21->26 flow missing for NAT use case

Description
-----------
21->26 flow is missing with the below use case

Use case :

1. create network
2. create subnet
3. create vm
4. create router
5. add subnet to router
6. create external network and subnet
7. create external bgpvpn
8. associate external bgpvpn to external network
9. openstack router set router1 --external-gateway myextnet10
       --disable-snat
10. openstack router set router1 --external-gateway myextnet10
       --enable-snat

Notice that the 21->26 flow is missing

Changes are done to install the 21->26 flows when we disable and
enable SNAT

Issue : NETVIRT-1294

Change-Id: I39a2b4d20aec4694aa269c334dc5635e7d7acd7e
Signed-off-by: shaik <shaik.b@altencalsoftlabs.com>
5 years agoLoosen DataObjectModification collection return 26/74726/3
Robert Varga [Wed, 1 Aug 2018 09:53:58 +0000 (11:53 +0200)]
Loosen DataObjectModification collection return

This allows the contract to be loosened so we can do type-safety
in implementation of DataObjectModification.

Change-Id: I6261a60fa2dfc3f0fcbc7e963dbbe7263375a6ea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove app-config-pusher feature dependency 02/74702/2
Faseela K [Tue, 31 Jul 2018 18:51:37 +0000 (00:21 +0530)]
Remove app-config-pusher feature dependency

This openflowplugin feature is not used by netvirt.

Change-Id: Ie2b9f972304d30af9dbd20da1518c7a42ba711fd
Signed-off-by: Faseela K <faseela.k@ericsson.com>
5 years agoDatastore txes : fibmanager 87/73887/9
Stephen Kitt [Tue, 10 Jul 2018 11:59:52 +0000 (13:59 +0200)]
Datastore txes : fibmanager

This switches fibmanager to datastore-constrained transactions, except
where they conflict with the resource batching manager.

This requires Ic63fd992b33e9e1cd4049bc129545a9830b7a8c0.

JIRA: NETVIRT-1340
Change-Id: Ia766e6089ed3fd8b70f0a3f03e636ac1000c2cbb
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoException Handling in UpgradeStateListener 19/74619/2
xcheara [Sun, 29 Jul 2018 10:23:15 +0000 (15:53 +0530)]
Exception Handling in UpgradeStateListener

Change-Id: I8bf268e8392b9f7b3902de318833729f3dfca4f4
Signed-off-by: xcheara <chetan.arakere@altencalsoftlabs.com>
5 years agoPrefix to interface d.s not cleared 80/74180/6
nithi thomas [Tue, 10 Jul 2018 10:01:00 +0000 (15:31 +0530)]
Prefix to interface d.s not cleared

Issue:
======
Stale flows not removed for many data stores .
Stale entries were not removed for prefix-to-interface d.s
because of which dependent vpn related d.s were not cleared.

Analysis:
=========
Prefix-to-interface was wrongly getting deleted from
removePrefixToInterfaceAdj() in updtae() in VpnInterfaceManager.java
because of which in cleanUpOpDataForFib() ,prefixinfo was null and the
respective calls to delete prefix-to-interface and vpn-interace-op-data
was getting missed.
         Removed the call removePrefixToInterfaceAdj().

Issue: NETVIRT-1223

Change-Id: Id892b033014606e6c451cb2c5644d839ec2da5ac
Signed-off-by: nithi thomas <nithi.t@altencalsoftlabs.com>
5 years agoTraffic drop b/w DC-GW and VM 83/74583/3
Somashekar Byrappa [Fri, 27 Jul 2018 14:20:57 +0000 (19:50 +0530)]
Traffic drop b/w DC-GW and VM

Issue:
------
L3_LFIB_TABLE (20) flows were missing for the interfaces.

Fix:
----
Corrected if check to program L3_LFIB_TABLE flows in case of BGP-VPN.

Change-Id: I8fd26cc406e9ed04a315e56a51c91413367680c3
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
5 years agoRetain NAPT Switch after Upgrade for SNAT 62/72062/21
xcheara [Thu, 22 Mar 2018 07:19:31 +0000 (12:49 +0530)]
Retain NAPT Switch after Upgrade for SNAT

Test Scenario1: All OVS are connected back after upgrade.

1) Take the back-up of the Config DS and bring down the controller.
2) Disconnect OVS(by blocking port 6640 & 6653)
3) Upgrade ODL, set upgrade-flag=true and reload the config DS.
4) Start connecting back the OVS with first connecting non-napt
switches followed by Napt-Switches.
5) set upgrade-flag=false once all the OVS are connected by to ODL.
6) Verify earlier Napt Switches continues to work as Napt Switches
and all earlier on-going SNAT session and new sessions are not
impacted.

Test Scenario2: Few OVS(which are elected as Napt) are not
connected back after upgrade.

1) Take the back-up of the Config DS and bring down the controller.
2) Disconnect OVS(by blocking port 6640 & 6653)
3) Upgrade ODL, set upgrade-flag=true and reload the config DS.
4) Start connecting back the OVS with first connecting non-napt
switches and do not connect few OVS elected as Napt Switches earlier.
5) set upgrade-flag=false.
6) Verify a new Napt Switch is elected for those router whose Napt
Switches are not been connected back after upgrade.
7) Verify new SNAT sessions are established and earlier on-going SNAT
session gets migrated to newly elected Napt Switch.

JIRA: NETVIRT-1222

Change-Id: I194124596e987c43703be37707235a6c88c91013
Signed-off-by: xcheara <chetan.arakere@altencalsoftlabs.com>
Signed-off-by: shaik <shaik.b@altencalsoftlabs.com>
Signed-off-by: xcheara <chetan.arakere@altencalsoftlabs.com>
5 years agoClean up MDSALManager exception handling 29/74229/4
Stephen Kitt [Wed, 18 Jul 2018 16:24:34 +0000 (18:24 +0200)]
Clean up MDSALManager exception handling

Now that the MDSALManager interfaces have been updated, we can adjust
NetVirt to use the exceptions as declared instead of dealing with
Exception.

Change-Id: I4b41025f54f63a66a01b1f9b50d4f12918863289
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoBump to odlparent 3.1.3 01/74201/4
Stephen Kitt [Wed, 18 Jul 2018 16:06:41 +0000 (18:06 +0200)]
Bump to odlparent 3.1.3

Change-Id: I15b0586dbed9cec935ba8504a2e2f9beb7fd8593
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoAvoid duplicate processing code with events 35/74335/6
Stephen Kitt [Mon, 23 Jul 2018 12:43:50 +0000 (14:43 +0200)]
Avoid duplicate processing code with events

When we use event callbacks to react to the appearance of
currently-missing data, we might as well use that as the nominal flow
too: if the data is present, the event callback's underlying listener
will fire immediately, and the callback will be handled straight
away. This avoids duplicating code whenever an event callback is
used.

If performance testing reveals that fast paths are needed, we can
handle that centrally in the event callback mechanism, instead of
repeating it at every call site.

Change-Id: I49791d810946988c704a9cfe24297c977c1c8c84
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoRemove unused exceptions 61/74461/5
Stephen Kitt [Wed, 25 Jul 2018 14:48:13 +0000 (16:48 +0200)]
Remove unused exceptions

This drops exception declarations which are never used.

Change-Id: I754690dcd1aa17dcd9b56fb290dcf173d2f6fc08
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoVPN-to-Router Associate/Disas Performance Improve 54/74454/4
Karthikeyan Krishnan [Wed, 25 Jul 2018 13:47:48 +0000 (19:17 +0530)]
VPN-to-Router Associate/Disas Performance Improve

Addressing few review comments which got it
from existing merged patch[0].

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

Issue: NETVIRT-1182

Change-Id: I98ca89e082c3f339e75b8de3f1ad2eb83cebfbbc
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
5 years agorm runtime logging change in QosAlertGenerator 96/74496/3
Michael Vorburger [Thu, 26 Jul 2018 10:59:31 +0000 (12:59 +0200)]
rm runtime logging change in QosAlertGenerator

JIRA: CONTROLLER-1845
Change-Id: I4b92254b0b47a718f9920166b5dbfc177cbf8dc7
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
5 years agoConntrack headers fails to parse. 88/74388/3
Aswin Suryanarayanan [Tue, 24 Jul 2018 11:17:11 +0000 (16:47 +0530)]
Conntrack headers fails to parse.

The extra headers added to the packet when it return from ovs after a
conntrack operation causes deserialization error when the packet is
punted to the controller.

Added ct_clear action once the packet is returned from conntrack in
table=47

table=47, n_packets=50, n_bytes=4887,
priority=6,ct_state=+snat,ip,metadata=0x30d40/0xfffffe
actions=load:0x30d48->OXM_OF_METADATA[0..23],
load:0->NXM_OF_IN_PORT[],ct_clear,resubmit(,21)

NETVIRT-1383 Traffic to the PNF from a VM without FIP fails(SNAT
conntrack)

Change-Id: Ib34109b7fe3c7aa1df105c8504394291031e68d6
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
5 years agoAdd support for official OVS NSH implementation 52/74352/2
Jaime Caamaño Ruiz [Wed, 6 Jun 2018 15:45:46 +0000 (17:45 +0200)]
Add support for official OVS NSH implementation

Change-Id: Id0adf67fa3e39da46d667efe1c0bc13c34c49443
JIRA: TSC-114
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
5 years agovpnmanager-impl compilation issue 42/74442/2
Somashekar Byrappa [Wed, 25 Jul 2018 07:26:38 +0000 (12:56 +0530)]
vpnmanager-impl compilation issue

Change-Id: I4fcd30bcc9aa6fcdd764efd7e65925e5afb72cc8
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
5 years agoFix exception in addSwitch 78/74378/2
Sridhar Gaddam [Tue, 24 Jul 2018 08:33:36 +0000 (14:03 +0530)]
Fix exception in addSwitch

In a fresh deployment when the first switch is
added to the controller and when there are no
neutron resources (like ExtRouters) are present,
the current implementation in addSwitch was
causing ExpectedDataObjectNotFoundException.
This patch fixes it by changing the syncRead
to syncReadOptional while querying the datastore.

Issue: NETVIRT-1382

Change-Id: I4393a7ad2fa896eda2e1cbb88e3c34c9ffcc0c56
Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
(cherry picked from commit acb65d76fce6e6a361fd59a72fe33f067f3d27c1)

5 years agoUse IetfYangUtils to canonize addresses 64/74364/2
Robert Varga [Mon, 23 Jul 2018 23:33:27 +0000 (01:33 +0200)]
Use IetfYangUtils to canonize addresses

IetfYangUtils provides optized utility methods for converting
Mac/PhysAddress to its canonical lower-case format. Use it wherever
possible. This prevents unnecessary object duplication.

Change-Id: I8f9361787e113023fc6e9fa660931698ff7250b2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not bounce Ipv6Prefix through String 21/74321/7
Robert Varga [Mon, 23 Jul 2018 05:32:49 +0000 (07:32 +0200)]
Do not bounce Ipv6Prefix through String

Rather than converting IpPrefix to String and then back, just use
Ipv6Prefix.

Change-Id: I025dd968af44f54aaa752fd65bf953a291446675
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse IpAddress-based createHwvtepPhysicalLocator 20/74320/7
Robert Varga [Mon, 23 Jul 2018 05:07:13 +0000 (07:07 +0200)]
Use IpAddress-based createHwvtepPhysicalLocator

Use IpAddress-based createHwvtepPhysicalLocatorAugmentation()

This removes the need to de-encapsulate IpAddress string by retaining
IpAddress.

Change-Id: I9f657d082be5e0830eafc82fc81aa1e6a045277d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix typos in log message 72/74372/1
Sridhar Gaddam [Tue, 24 Jul 2018 07:13:34 +0000 (12:43 +0530)]
Fix typos in log message

Change-Id: Id0c49a11e3ebee3fd2f857bf2ddaa78fe4fd9566
Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
5 years agoDo not use char[]-based union access 14/74314/6
Robert Varga [Sun, 22 Jul 2018 21:09:42 +0000 (23:09 +0200)]
Do not use char[]-based union access

Both the constructor and getValue() method are going away, do not
use them.

Change-Id: If0b2b7db98bfba090b437366e80f808e871ebbf5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoVPN changes for IPv6 ND based aliveness monitor 98/73598/13
Somashekar Byrappa [Fri, 29 Jun 2018 07:56:19 +0000 (13:26 +0530)]
VPN changes for IPv6 ND based aliveness monitor

+ Learnt hidden IPv6 addresses are monitored using ND based aliveness
  monitor.
+ Tried to have common code for both IPv4 and IPv6 whereever possible.

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

JIRA: NETVIRT-1213

Change-Id: Ie49d07a7039af888bfe5308a2037418cc17bbd60
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
5 years agoVNI based L3 forwarding support for BGPVPN 97/70897/24
xcheara [Fri, 13 Apr 2018 08:16:07 +0000 (13:46 +0530)]
VNI based L3 forwarding support for BGPVPN

Description: As part of this spec implementation earlier, VNI based
forwarding for BGPVPN was kept out of scope. This Change addresses to
support VNI based forwarding of packet over VXLAN tunnel covering Router
associated and Network Associated BGPVPN and iRT/eRT use-cases.

Additional changes to preventing backpulling of neutron subnet-map to
retieve network-related attributes in vpn-engine is been addressed.

Handled missing destination mac address in the remote fib flow for
iRT/eRT use-cases.

Issue : NETVIRT-1209

Change-Id: Ib61d0c02129de980348436cdeba7939488c2da6e
Signed-off-by: xcheara <chetan.arakere@altencalsoftlabs.com>
5 years agoRefactor VpnManager module. 05/73005/13
Somashekar Byrappa [Thu, 14 Jun 2018 14:17:26 +0000 (19:47 +0530)]
Refactor VpnManager module.

+ Refactoring VpnManager to support subnet routing for hidden IPv6
  addresses.
+ Moved all IP learning classes to package org.opendaylight.netvirt
  .vpnmanager.iplearn.
+ Renamed few classes to Ip*** instead of Arp*** to keep it common for
  both IPv4 and IPv6.
+ Refactored code in iplearn package to handle both IPv4 and IPv6.
+ Kept placeholders (TODO's) for supporting IPv6 subnet routing for
  hidden IPs.

JIRA: NETVIRT-1213

Change-Id: I7f2c7968d92d61b4d3e1d8a1d858df34368344e8
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
5 years agoVPN-to-Router Associate/Disas Performance Improve 76/74176/4
Karthikeyan Krishnan [Wed, 18 Jul 2018 06:18:46 +0000 (11:48 +0530)]
VPN-to-Router Associate/Disas Performance Improve

Problem Description:
====================
When BGP-VPN is getting associated with router, FIB entries
are getting programmed very slow. This will cause the
performance of the VPN Manager.

Solution:
=========
Delay root cause: Each VPN interface update is taking 2 sec time to
remove the old VPN ID and update the new VPN ID and VPN service
unbind and bound to new VPN Instance.

To avoid each VPN interface update 2sec time delay, have moved
the method "handleVpnSwapForVpnInterface" processing logic into
JobCoordinator to process each VPN interface update in parallel.
This way overall FIB entry update is consuming less time compare
to without having this code change.

Issue: NETVIRT-1182

Change-Id: Ic17cba3e325a0c63fead9d30ec857c0e7eb8dcfc
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
5 years agoRemote group flow fails in conntrack SNAT 11/74011/6
Aswin Suryanarayanan [Fri, 13 Jul 2018 11:20:41 +0000 (16:50 +0530)]
Remote group flow fails in conntrack SNAT

The flow to take the packet to the packet to the NAPT switch from
non-napt switch fails occasionally, since the group is not programmed in
time.

The flow is now programmed only when the group is available in
Config datastore.

NETVIRT-1352 CSIT sporadic failures Random ping failure in snat
conntrack mode

Change-Id: I0d27372470cd3219a8ede5c5c35bc4679f772fb8
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>