netvirt.git
6 years agobgpmanager BgpUtil code clean-up: Make private what can, and rm unused 11/62211/3
Michael Vorburger [Wed, 23 Aug 2017 15:03:49 +0000 (17:03 +0200)]
bgpmanager BgpUtil code clean-up: Make private what can, and rm unused

Change-Id: I484c456e44d2414ef4f03f86b4b1e79d6fcd52bc
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoRevert "Add git commit coala bear" 21/62421/2
Sam Hague [Tue, 29 Aug 2017 16:46:28 +0000 (16:46 +0000)]
Revert "Add git commit coala bear"

This reverts commit 12d10f57789a5a63cf1ae6133f64205f247ff0fd.

Change-Id: I23574392ac3e152585043839c38dd749aee7ed77
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoBug 9034: bgpmanager BgpUtil rm unused pendingWrTransaction 17/62217/3
Michael Vorburger [Wed, 23 Aug 2017 15:25:07 +0000 (17:25 +0200)]
Bug 9034: bgpmanager BgpUtil rm unused pendingWrTransaction

There's no set() for the pendingWrTransaction, so it's.. completely
pointless - and that retry loop in BgpConfigurationManager's
createStaleFibMap() could never have worked anyway, as
BgpUtil.getGetPendingWrTransaction() == 0, always.

Change-Id: I8644a3a9d63c5eff4106c58865cad9969d3990a2
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoL2 Support for Pods 64/62364/2
Faseela K [Mon, 28 Aug 2017 13:46:18 +0000 (19:16 +0530)]
L2 Support for Pods

Whenever the first pod under a namespace is created, an elan-instance
is created. Also for each pod interface an l2vlan trunk interface as
well as an elan-interface is created.

Change-Id: Ib32b987c8c86467ead8e0b4e38d3586d4fb93f70
Signed-off-by: Faseela K <faseela.k@ericsson.com>
6 years agoBug 8860: NPE in getElanTag from SubnetmapChangeListener 69/62369/4
Vivekanandan Narasimhan [Mon, 28 Aug 2017 15:05:22 +0000 (20:35 +0530)]
Bug 8860: NPE in getElanTag from SubnetmapChangeListener

The exception is genuine, but in order to enable tightening
of exception throws in netvirt, we are logging this
exception gracefully via this fix.

The real reason why this exception occurs can be ascertained
only the context information available when this issue happens
again in any upstream job.

The bug itself does not have link to logs that have this
exception thrown, for any postmortem/analysis.

Change-Id: I1c29efad5de85bfd340ea54a3600db9997c12a4b
Signed-off-by: Vivekanandan Narasimhan <n.vivekanandan@ericsson.com>
6 years agoAdd git commit coala bear 26/62326/8
Sam Hague [Fri, 25 Aug 2017 16:14:21 +0000 (12:14 -0400)]
Add git commit coala bear

Depends-on: https://git.opendaylight.org/gerrit/62325

Change-Id: I8523b865d60afa16c1ceac1261ee01ce6e70378c
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoBug 9030 - port and port security groups cannot be null 79/62179/6
Aswin Suryanarayanan [Wed, 23 Aug 2017 05:34:14 +0000 (11:04 +0530)]
Bug 9030  - port and port security groups cannot be null

The error logs are written when the port has no security groups. It is
perfectly fine for a port to not have security groups and hence lowering
the log level to info.

Removed the uneccsary null check of security groups while bind service
is called.

Change-Id: Ic386938e3ef14501798499abe5d82f3c63f329af
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
6 years agoBug 9051 - Failed to handle router GW flow in GW-MAC table. DPN id is missing for... 93/62293/2
Andre Fredette [Thu, 24 Aug 2017 20:05:46 +0000 (16:05 -0400)]
Bug 9051 - Failed to handle router GW flow in GW-MAC table. DPN id is missing for router-id

Change log level and message.

Change-Id: I94406443eb67c6fecfc8ecaaf349ed6cb2168b80
Signed-off-by: Andre Fredette <afredette@redhat.com>
6 years agoCoe renderer merge build failed due to groupId not present in aggregator 46/62246/4
Faseela K [Thu, 24 Aug 2017 06:06:11 +0000 (11:36 +0530)]
Coe renderer merge build failed due to groupId not present in aggregator
pom

Change-Id: Ia39b2d40efe6a1521631a8a6cd13cdc3a80ed78e
Signed-off-by: Faseela K <faseela.k@ericsson.com>
6 years agoBug 9034: bgpmanager BgpUtil rm unused BindingTransactionChain & Co. 15/62215/2
Michael Vorburger [Wed, 23 Aug 2017 15:07:30 +0000 (17:07 +0200)]
Bug 9034: bgpmanager BgpUtil rm unused BindingTransactionChain & Co.

Not sure if this fixed Bug 9034, but let us please remove this clearly
un-used Transcation Chain here - it's one less to worry about when
analyzing this OOM.

Change-Id: Ide872b7d439d5b25f6cd759c129cc29190b483cc
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoBug 9039 - In Conntrack SNAT, when a router g/w is cleared traffic is 20/62220/2
Aswin Suryanarayanan [Wed, 23 Aug 2017 16:24:52 +0000 (21:54 +0530)]
Bug 9039 - In Conntrack SNAT, when a router g/w is cleared traffic is
dropped for other routers

Pfib flow is made per router for inbound and outbound traffic. The
metadata rewrite from internal to external for outbound traffic  happens
in the PFIB table.

Change-Id: I17bc024e66c424459d8fe8b1ddf02a1d7a96d2bb
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
6 years agoInitial Bundle setup for coe renderer 59/61559/11
Faseela K [Fri, 11 Aug 2017 20:46:58 +0000 (02:16 +0530)]
Initial Bundle setup for coe renderer

This patch adds the following :

1. coe-renderer-api and coe-renderer-impl bundles
2. Add them to respective features
3. COE Pod and Service Listener skeleton

Change-Id: Ibe692953d40c781a843cb8c4632a1aedd07ab087
Signed-off-by: Faseela K <faseela.k@ericsson.com>
6 years agoBug 9022: ACL: Broadcast traffic is dropped in ACL tables 51/62151/1
Shashidhar Raja [Mon, 21 Aug 2017 14:20:21 +0000 (19:50 +0530)]
Bug 9022: ACL: Broadcast traffic is dropped in ACL tables

This fix enables ACL to permit Broadcast Traffic (Both IP and Non IP).

Related to IP Broadcast, Subnet-Directed Broadcast and All-Subnet
Broadcast traffic on the same network is being allowed subject to one of
the conditions specified below is met:
  (a) The ports that want to communicate share the same
      remote-secuirty-group
  (b) The ports that want to communicate allow the other port's IP Address
      in remote-ip-prefix
  (c) The ports that want to communicate have securiyt0group with
      remote-ip-prefix of 0.0.0.0/0.

IP Broadcast flows configured in VM Ingress ACL table (table 241) is as
below:

all-subnet flow:
cookie=0x6900000, duration=1463.293s, table=241, n_packets=0, n_bytes=0,
       priority=61010,ip,dl_dst=ff:ff:ff:ff:ff:ff,nw_dst=255.255.255.255
       actions=goto_table:242

subnet-directed flow:
cookie=0x6900000, duration=975.798s, table=241, n_packets=0, n_bytes=0,
       priority=61010,ip,metadata=0x10000000000/0x1fffff0000000000,
       dl_dst=ff:ff:ff:ff:ff:ff,nw_dst=10.1.1.255 actions=goto_table:242

Non IP Broadcast flows (with lower priority than other flows - 61005)
configured in VM Egress(211) and Ingress(241) tables is as below:

cookie=0x6900000, duration=30.298s, table=211, n_packets=0, n_bytes=0,
       priority=61005,metadata=0x10000000000/0x1fffff0000000000,
       dl_src=fa:16:3e:a9:4d:81 actions=resubmit(,17)

cookie=0x6900000, duration=901.855s, table=241, n_packets=0, n_bytes=0,
       priority=61005,dl_dst=ff:ff:ff:ff:ff:ff actions=resubmit(,220)

Below are change details:
 - Updated to add a flow to allow broadcast traffic with destination
   adddress 255.255.255.255. Changes related to this are in
   AclNodeListener.java
 - Updated to add flows at port level for subnetwork's broadcast addresses
 - Updated to add flows in 211/241 for Non-IP broadcast traffic
 - Updated to add ARP/IP/IPv6 default drop flows with lower priority than
   respective flows and higher priority than non-ip broadcast flow
 - New yang definition introduced in ACL for higher modules (Neutron VPN
   in our case) to pass broadcast CIDRs when ACL Interface is created
 - NeutronVpn is updated to pass subnet CIDRs when ACL Interface is
   created

Change-Id: I71c5040454b3c00af43dcef4f47b5979cd7cf3a5
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
6 years agoBUG 9014 : Remove unnecessary log statements in VPN Engine 21/62121/2
eupakir [Tue, 22 Aug 2017 05:47:52 +0000 (11:17 +0530)]
BUG 9014 : Remove unnecessary log statements in VPN Engine

Change-Id: I501beac66cc8f9ffc44d5f12b22514d7d3b03d22
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
6 years agobug 9018 l2gw designated dhcp fix 78/62078/3
K.V Suneelu Verma [Mon, 21 Aug 2017 11:21:27 +0000 (16:51 +0530)]
bug 9018 l2gw designated dhcp fix

Instead of listening for logical switch creation, listen for
mcast mac creation and update the mcast mac to avoid race of updating the
mcast mac.
while updating mcast mac read the existing mac and add designated dhcp tep
ip to the existing locators.

Change-Id: Id4d99471ae0b3be306a5511ee7cea975606deaa3
Signed-off-by: K.V Suneelu Verma <k.v.suneelu.verma@ericsson.com>
6 years agolower BGPconnect logs to debug level 49/62149/1
Sam Hague [Tue, 22 Aug 2017 11:57:06 +0000 (07:57 -0400)]
lower BGPconnect logs to debug level

Change-Id: Ied9756d8ea082d52bc6719a0fe42a6dcf52c25ce
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoRemove unused NatNodeEventListener 17/62017/3
Faseela K [Sat, 19 Aug 2017 06:29:34 +0000 (11:59 +0530)]
Remove unused NatNodeEventListener

This listener does not have anything else other than debug statements.
This was seen while analyzing the delay in programming default flows
when switches are connected in scaled scenario. While trying to optimize
the number of listeners and heavy operations being done in listener
thread, this came to notice. There is no heavy operation here, but if
the listener is of no use, let us avoid one unnecessary registration.

Change-Id: I87f80b851472dba7364fe16c5d39d8ed775b2d67
Signed-off-by: Faseela K <faseela.k@ericsson.com>
6 years agoBug 9012 : BGP reconnect and retry logic to QBGP 74/61974/5
Vyshakh Krishnan CH [Fri, 18 Aug 2017 09:05:15 +0000 (14:35 +0530)]
Bug 9012 : BGP reconnect and retry logic to QBGP

During the internal testing we have observed that for many configs, thrift is not reliable enough and QBGP is not receiving the configs ODL is sending. So as a safer way, introducing retries while sending the configs to QBGP. Also reconnect mechanism in case of any thrift transport exception

Change-Id: I9862d3db093f85399e81207c787528da25445999
Signed-off-by: Vyshakh Krishnan CH <vyshakh.krishnan.c.h@ericsson.com>
6 years agoBug 9014 - ElanUtils: buildRemoteDmacFlowEntry 39/62039/4
Sam Hague [Sun, 20 Aug 2017 11:35:33 +0000 (07:35 -0400)]
Bug 9014 - ElanUtils: buildRemoteDmacFlowEntry

Bug 9014 - ElanUtils: buildRemoteDmacFlowEntry: Could not find interfaceName

These logs are not errors as the tests pass. The data eventually is available in the datastore.

Change-Id: Id09647a642dc6023b4d34f37fa12839d6a077407
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoBUG 9014: Remove unnecessary Log statements for evpn/subnetroute 56/62056/6
Vivekanandan Narasimhan [Mon, 21 Aug 2017 05:33:20 +0000 (11:03 +0530)]
BUG 9014: Remove unnecessary Log statements for evpn/subnetroute

1.Modified error logs to debug logs in necessary places
from evpn rt2 code, especially which hits for non-evpn scenarios.

2. This cannot find portOp Error was earlier relevant
where race conditions existed between interface-state
event southbound and subnet-port openstack configuraiton from
northbound.   Later we divided handling the subnetroute
creation into two batches to address the race condition
properly in [1].

As a result with [1] being merged, the error statement for
portOp is not required anymore and so this fix removes that
error statement.

[1] https://git.opendaylight.org/gerrit/#/c/61823/

Change-Id: Ic61f7ec5e3b9733f3e2f9a6bfc56af15c8af6d73
Signed-off-by: Vivekanandan Narasimhan <n.vivekanandan@ericsson.com>
6 years agoBug 8960: port information for 1 dpn is missing in subnet-op-data and 23/61823/6
ehvkand [Wed, 16 Aug 2017 09:42:03 +0000 (15:12 +0530)]
Bug 8960: port information for 1 dpn is missing in subnet-op-data and
port-op-data

Upon PL reboot , if southbound event (PortUP) event is received first and
northbound event(OnSubnetAddedToVpn) is received later ,DPN will not be
updated in PortOpData.

Fix :
(1) When northbound event is received , SubnetOpDataEntry is created
first by using clustered wide lock based on subnetId. Then PortOpDataEntry
and subnetToDpn is created.

(2)Incase southbound event is received first,PortOpData entry may not be
available.In such case subnetId is retrieved from Neutron cache and
PortOpData entry will be created by the SubnetInterfaceStateChangeListener
thread.

Change-Id: I3a0d9c814909e6031bd1e25dd32564415fb912d8
Signed-off-by: ehvkand <hanamantagoud.v.kandagal@ericsson.com>
6 years agoBug 8981: ACL: ARP/DHCP anti-spoofing flows does not include VM/AAP ip/mac 69/61569/9
Shashidhar Raja [Sun, 13 Aug 2017 03:22:49 +0000 (08:52 +0530)]
Bug 8981: ACL: ARP/DHCP anti-spoofing flows does not include VM/AAP ip/mac
matches in VM egress direction

ACL updated to include IP+MAC matches for ARP and MAC only matches for DHCP
with anti-spoofing flows in VM egress direction

Change-Id: If3e3de5a4ea66dc23c6bec5ba66881abb6cdbc0a
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
Signed-off-by: Vivekanandan Narasimhan <n.vivekanandan@ericsson.com>
6 years agocleanup for erros that should be info 55/62055/2
Sam Hague [Mon, 21 Aug 2017 00:49:56 +0000 (20:49 -0400)]
cleanup for erros that should be info

Change-Id: Ic81243d4fa03f173cfa6f140e7fc3c925e3533bf
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoUse INFO for logging GW search misses 31/62031/2
Sam Hague [Sun, 20 Aug 2017 01:33:55 +0000 (21:33 -0400)]
Use INFO for logging GW search misses

Change-Id: Ib240dfe59804b3f101ae3fe305c6960da3046624
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoBug 8996 : BGP EOR and some minor fixes 07/61807/6
Vyshakh Krishnan CH [Wed, 16 Aug 2017 08:23:09 +0000 (13:53 +0530)]
Bug 8996 : BGP EOR and some minor fixes

Today ODL is sending the neigbour config to QBGP at the end of config replay. ie after VRFS and Netwroks. SO after a cluster reboot, neighborship establishment is taking time. A new EOR mechanishm is introducd, so that ODL can send the neighbor first. QBGP will wait for EOR from ODL to send the EOR to neighbor

Also some minor BGP fixes

Change-Id: Ib00827919aa227650ca9d7f345f40a0aed55124d
Signed-off-by: Vyshakh Krishnan CH <vyshakh.krishnan.c.h@ericsson.com>
6 years agoBug 9015 - Unable to install group 33/62033/3
Sam Hague [Sun, 20 Aug 2017 02:49:28 +0000 (22:49 -0400)]
Bug 9015 - Unable to install group

The code checking the response for the RPC was incorrectly assuming the future would return and Rpcresult.result

This job had extra debugging to show the result is coming back as null:

https://logs.opendaylight.org/releng/jenkins092/netvirt-csit-1node-openstack-ocata-gate-stateful-nitrogen/123/odl1_karaf.log.gz

2017-08-20 04:24:59,096 | INFO  | nPool-1-worker-0 | NexthopManager                   | 302 - org.opendaylight.netvirt.fibmanager-impl - 0.5.0.SNAPSHOT | Group 150000 with key nexthop.10000050.0.0.2/32 has been successfully installed directly on dpn 273623493589781. rpcResult: RpcResult [successful=true, result=null, errors=[]], isSuccessful: RpcResult [successful=true, result=null, errors=[]], getResult: true

Change-Id: Ie1717102b19aca85043ff7ddbba6bce6fbd6799d
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoBug 8974: Fix subnet-directed-broadcast-addr ARP issue 30/61530/3
HANAMANTAGOUD V Kandagal [Fri, 11 Aug 2017 06:22:26 +0000 (11:52 +0530)]
Bug 8974: Fix subnet-directed-broadcast-addr ARP issue

Currently subnet-directed-broadcast-addr packets are punted to controller.
Controller sends a ARP request for the same IP address.

To avoid the same, FIB entry is added with subnet-directed-broadcast-addr
match and action to drop the packet instead of punting to controller.

Change-Id: I335a040d99e91d30fb75ad84cf18045eb21524e2
Signed-off-by: HANAMANTAGOUD V Kandagal <hanamantagoud.v.kandagal@ericsson.com>
6 years agoBug 8976 - Upstreaming fixes to master 45/61545/11
eupakir [Fri, 11 Aug 2017 12:37:42 +0000 (18:07 +0530)]
Bug 8976 - Upstreaming fixes to master

This patch includes logging enhancements in the VPN Engine

Change-Id: I83c13f221cbf0299758e2e17580681c71aa7a80f
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
6 years agoBug 8976 - Upstreaming fixes to master 42/61542/8
eupakir [Fri, 11 Aug 2017 10:28:10 +0000 (15:58 +0530)]
Bug 8976 - Upstreaming fixes to master

This patch contains fixes:
1) To capture the last advertised state for a subnet route
2) Fixes for iRT/eRT deletion use-cases
3) Some Logging enhancements for subnet route

Change-Id: If9290d41bd5851079ecf482a4eb33f1ba3991981
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
6 years agoBug 8998 - L2GW:Vlan bindings missing on reboot 40/61840/9
eaksahu [Wed, 16 Aug 2017 12:33:48 +0000 (18:03 +0530)]
Bug 8998 - L2GW:Vlan bindings missing on reboot

Vlan bindings are missing upon cluster reboot.
While processing physical switch node add event , its global node
is not available yet.
Enqueued this job to global node add pending job wait list so that
eventually after the global node is added this gets processed.

Handled the tunnel ip change of the physical switch.
When the tunnel ip changes delete old itm tunnels
create new tunnels with new tunnel ip
retrigger the l2gw connection processing to take affect of the
new tunnel ip.

Handled the local ucast macs that are added to the southbound device
while odl is down.
When odl comes up as part of processing its l2gw connections
it pulls the added local ucast macs from the southbound device.

Change-Id: Id6fdbbfe852a6fc0d89f360eb498fece8f00bdb5
Signed-off-by: eaksahu <a.k.sahu@ericsson.com>
6 years agoBug 8978 - Network deletion issue. 40/61540/9
eaksahu [Fri, 11 Aug 2017 09:47:18 +0000 (15:17 +0530)]
Bug 8978 - Network deletion issue.

Elaninstance after deletion was clearing l2gateway connection
configuration , but was not deleting l2gatewayConnection object itself
from neutron config tree. This leads to reconfiguration of
l2gatewayconnection upon reboot / device reconnect also.
Fixed the above case.
Added way to cancel logical switch deletion , so that if the same
network is reconfgured while deletion is going on , it can be cancelled.
Calling logical switch delete cancel when associating the same network
to l2gw.

Change-Id: I530c4b87becf3043eb8c4ba03226447731b2db0b
Signed-off-by: eaksahu <a.k.sahu@ericsson.com>
6 years agoBug 8965 - L2gw update is not suported 26/61426/4
eaksahu [Wed, 9 Aug 2017 14:22:09 +0000 (19:52 +0530)]
Bug 8965 - L2gw update is not suported

Currently l2gw once created , no update are on that are supported.
With this patch following use case has been supported.
Update existing l2gw vlanbindings
Update existing l2gw with new ports / device .

It takes care of configuring w.r.t associated l2gwconnection .

Change-Id: I37dda9cf366b1fe59ccf95f64f0574448f156d47
Signed-off-by: eaksahu <a.k.sahu@ericsson.com>
6 years agoRemove last remaining federation-plugin 38/62038/2
Sam Hague [Sun, 20 Aug 2017 10:56:41 +0000 (06:56 -0400)]
Remove last remaining federation-plugin

Change-Id: I6e1698395a00365ed16eda518a36ed41e11cc758
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoset BGP connect problem to be info 32/62032/2
Sam Hague [Sun, 20 Aug 2017 01:45:33 +0000 (21:45 -0400)]
set BGP connect problem to be info

Change-Id: I828d273eab454fa48f01309fe10b8c54423216f7
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoBug 8774 DHCP Service to use DHCP Port MAC Address 05/59805/5
Achuth Maniyedath [Fri, 30 Jun 2017 19:12:09 +0000 (00:42 +0530)]
Bug 8774 DHCP Service to use DHCP Port MAC Address

Use DHCP Port MAC Address for responding to DHCP
discover/renew requests.

Change-Id: I00ab448fb2894fc1ae38084033294ab9acd69ab6
Signed-off-by: Achuth Maniyedath <achuth.m@altencalsoftlabs.com>
6 years agoBug8861 : Data validation failed for path /snatint-ip-port-map 49/61949/4
cgowdru [Thu, 17 Aug 2017 18:02:25 +0000 (23:32 +0530)]
Bug8861 : Data validation failed for path /snatint-ip-port-map

Description : When interface entry is deleted from interface-state OS,
in NAT InterfaceStateListener, as part of clean-up, we try to delete all
the SNAT sessions data assocaiated with that interface. But, an attempt was
done to delete an entry from snatint-ip-port-map even there doesn't exists any
SNAT translation resulting in this exception. Changes done to delete
snatint-ip-port-map ony if an valid entry exists.

Change-Id: Ic0d4fa08b91700c2b4a63ab6e613d7554741d413
Signed-off-by: cgowdru <chetan.arakere@altencalsoftlabs.com>
6 years agoFix Junit failures in master in ACL & SFC 18/62018/3
Faseela K [Sat, 19 Aug 2017 10:04:57 +0000 (15:34 +0530)]
Fix Junit failures in master in ACL & SFC

The junits were broken after the recent commit in yangtools
https://git.opendaylight.org/gerrit/#/c/48672/

Change-Id: Ib37cb57de2c59d558f89b9723f685071fee9ff3b
Signed-off-by: Faseela K <faseela.k@ericsson.com>
6 years agoBug 8926: Fix instance doesn't get an IP after deployment 15/62015/1
Sridhar Gaddam [Fri, 18 Aug 2017 16:59:09 +0000 (22:29 +0530)]
Bug 8926: Fix instance doesn't get an IP after deployment

In a fresh multinode deployment with Controller node running
ODL + dhcp-agent and a Compute node, when we spawn a first VM
on the compute node, it was seen that VM does not acquire the
IPAddress.

On debugging, it turns out that the remote broadcast group
entries were not programmed on the Compute node. This is a
timing/sync issue between Netvirt (Elan) and GENIUS. The
bug description explains the issue in detail and this patch
addresses the issue.

Change-Id: Ifee63e13cf330dd3056468eba95e6451e173e30b
Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
6 years agoBug 8973 : DHCP fixes 90/61490/3
Kency Kurian [Thu, 10 Aug 2017 11:45:23 +0000 (17:15 +0530)]
Bug 8973 : DHCP fixes

1. For SR-IOV vm dhcp request:
After controller restart it was found that the DHCP flows were being installed
as drop on the designated DPN.

Added a check to see if the DPN being added is already a designated DPN
then, drop flows need not be installed.

2. Added a null check for gateway ipaddress and also whenver getIpv4Address
is called.

3. Added a null check for l2gwdevice in installRemoteMCastMac.

Change-Id: I2fae322af07b582fa4e5a03522513976dd2c55e5
Signed-off-by: Kency Kurian <kency.kurian@ericsson.com>
6 years agoBug 8982: avoid .transform() NPEs 75/59875/10
Stephen Kitt [Mon, 3 Jul 2017 13:12:25 +0000 (15:12 +0200)]
Bug 8982: avoid .transform() NPEs

Guava’s Optional::transform doesn’t support null values returned by
the mapping function — it throws a NPE if that happens. java.util’s
Optional::map does support null values and returns an empty Optional.
Combined with the current YANG-based code’s ability to return null,
this means it’s better to use java.util’s method; this patch switches
all YANG-based Optional transforms to java.util.

Change-Id: I304762b8eed03480760d36ae6903cdb495bd7b05
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoBug 8979: Logging enhancements for VPNService 81/61581/6
Abhinav Gupta [Fri, 11 Aug 2017 12:01:42 +0000 (17:31 +0530)]
Bug 8979: Logging enhancements for VPNService

This fixes logging issues related to non-parametrization of logs, printing
of exceptions, changing log levels for a few logs.
These changes have been made across NeutronVPN primarily, and also a bit
for VPNManager and FIBManager

Change-Id: Ice4b206ada6cc591f96ef75eccd820683b21a647
Signed-off-by: Abhinav Gupta <abhinav.gupta@ericsson.com>
6 years agorm it module 44/61944/2
Sam Hague [Thu, 17 Aug 2017 15:39:29 +0000 (11:39 -0400)]
rm it module

Change-Id: I0865195683a45adcef787365c4e91e217eb7e514
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agorm federation plugin 46/61946/2
Sam Hague [Thu, 17 Aug 2017 15:43:32 +0000 (11:43 -0400)]
rm federation plugin

Change-Id: I2972254584cce0ed42213590683f2b2aab5ea678
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoUse correct namespace for lockmanager 39/61939/1
Vishal Thapar [Thu, 17 Aug 2017 14:46:28 +0000 (20:16 +0530)]
Use correct namespace for lockmanager

Requires: https://git.opendaylight.org/gerrit/#/c/61934/

Change-Id: I554f53945e4e3f7a6a28809bbb5d79cd6f483f5e
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
6 years agoBUG: Adapt SFC translator to SFC code in Nitrogen 04/61504/8
Manuel Buil [Thu, 10 Aug 2017 14:47:31 +0000 (16:47 +0200)]
BUG: Adapt SFC translator to SFC code in Nitrogen

BUG: 8966

SFC Translator must start using logical SFF otherwise it will not work

Change-Id: Iec8dd6ae757d230464162dd1612bcda3a8fd0f26
Signed-off-by: Manuel Buil <mbuil@suse.com>
Signed-off-by: Jaime Caamaño Ruiz <jaime.caamano.ruiz@ericsson.com>
6 years agoBUG 9003: Support source-logical-port acl match 15/61615/9
Jaime Caamaño Ruiz [Mon, 14 Aug 2017 14:21:28 +0000 (16:21 +0200)]
BUG 9003: Support source-logical-port acl match

Neutron flow classifier includes acl matches for source and destination
neutron ports. Added support for source port, and updated the model to
also include destination port although not supported yet.

Change-Id: I83f8cc362869d046cdce756b5cbe4b13215b75f0
Signed-off-by: Jaime Caamaño Ruiz <jaime.caamano.ruiz@ericsson.com>
6 years agoBUG 9003: Fix port chain event triggered two times 11/61711/4
Jaime Caamaño Ruiz [Mon, 14 Aug 2017 17:46:29 +0000 (19:46 +0200)]
BUG 9003: Fix port chain event triggered two times

Change-Id: I4dd83824808d3faa2f515901d9171bb8e812d681
Signed-off-by: Jaime Caamaño Ruiz <jaime.caamano.ruiz@ericsson.com>
6 years agoBUG 9003: Fix classifier entry processing order 10/61710/3
Jaime Caamaño Ruiz [Mon, 14 Aug 2017 17:45:56 +0000 (19:45 +0200)]
BUG 9003: Fix classifier entry processing order

Change-Id: Icfafe3ef3a77bd48e3ddcf249f6c1e41b3e57aa5
Signed-off-by: Jaime Caamaño Ruiz <jaime.caamano.ruiz@ericsson.com>
6 years agoBug 8945 - Missing key is getVrfId. Supplied key is VpnInstanceOpDataEntryKey 80/61580/2
eupakir [Mon, 14 Aug 2017 07:02:31 +0000 (12:32 +0530)]
Bug 8945 - Missing key is getVrfId. Supplied key is VpnInstanceOpDataEntryKey

On a router delete, the internal VPN for that router was being removed
before handling external networks associated to that router.
Releasing router based lport tags, which is part of L3VPN Over VxLAN,
depends on vpn operational data, but the vpn data was being deleted much
before handling external networks for that router.

Change-Id: I72c0ff142b3929808afcfa7e49589b5420f48510
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
6 years agovpnmanager DJC enqueueJob without using AbstractDataStoreJob API 64/60264/4
Michael Vorburger [Wed, 12 Jul 2017 21:34:36 +0000 (03:04 +0530)]
vpnmanager DJC enqueueJob without using AbstractDataStoreJob API

because when we moved genius.DJC to infrautils.JC we had concluded that
this method does not need to be exposed publicly, and (at the time) was
only used in 1 place (here).

In order to be able to eventually remove genius.DJC and switch to
infrautils.JC, adjusting this use to be compatible with the new API is a
first step.

Change-Id: Ia025cc542096ce417b35f57cdc723ebc9528ab14
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoBump versions by x.(y+1).z for next dev cycle 92/61692/1
Thanh Ha [Mon, 14 Aug 2017 17:32:25 +0000 (13:32 -0400)]
Bump versions by x.(y+1).z for next dev cycle

Change-Id: Ibacad85a349937fa2a27554577419fdc8ceb4349
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoRevert "Bug 8960: port information for 1 dpn is missing in subnet-op-data and port... 63/61563/2
Sam Hague [Fri, 11 Aug 2017 23:29:13 +0000 (23:29 +0000)]
Revert "Bug 8960: port information for 1 dpn is missing in subnet-op-data and port-op-data"

This reverts commit 679f82391862995bfea11011c217ba7a1a91cb5c.

Change-Id: I62bb7890803d5e5b51cf6f1d1bc359eeac75eb13
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoDo not catch Throwable 61/61461/3
Robert Varga [Wed, 9 Aug 2017 21:41:26 +0000 (23:41 +0200)]
Do not catch Throwable

Java code should never catch Errors, which catching Throwable does.
Catching Exceptions is more than adequate.

Change-Id: Iee3ae475438b7f872cb8f4a07dcd0187dc73657c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoBug 8972: dhcp-show does not display the defaults 91/61491/4
Kency Kurian [Thu, 10 Aug 2017 10:17:08 +0000 (15:47 +0530)]
Bug 8972: dhcp-show does not display the defaults

dhcp-show was not printing the default config values for lease time and
domain.

Also earlier the default value was hardcoded in this CLI instead of
fetching from thr constants file defined.

Change-Id: Ie5c3542bad7fd73bbe9aec5ab438ec46a1c3f87e
Signed-off-by: Kency Kurian <kency.kurian@ericsson.com>
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoBUG-8894 : display VPN interface count number for each VPN instance. 62/60762/2
Philippe Guibert [Wed, 26 Jul 2017 09:08:24 +0000 (10:08 +0100)]
BUG-8894 : display VPN interface count number for each VPN instance.

This value is displayed correctly in shell function.
vpn-instance-op-show --detail.

Change-Id: I9817aef44bc4b56889132aea3f17791b239bb7fd
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoBug 8821 : BGP Manager / BGP counter incorrect with VPNv6 prefixes 07/60607/2
Philippe Guibert [Fri, 7 Jul 2017 12:08:30 +0000 (13:08 +0100)]
Bug 8821 : BGP Manager / BGP counter incorrect with VPNv6 prefixes

The commit consists in not only counting separately the prefixes for
VPNv4, VPNv6, and EVPN; but also sums all previous values to get the
total numver of prefixes. That counter obtained wast taking into account
only VPNv4. Now it includes VPNv6.

Change-Id: I1c6b4acb98870ae919ef06c229537abbd966697b
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoNeutron Port allocation for DHCP Service 69/61469/2
Achuth Maniyedath [Thu, 11 May 2017 18:32:50 +0000 (00:02 +0530)]
Neutron Port allocation for DHCP Service

The feature enables DHCP service to make use of the
newly created Neutron ports provisioned by Openstack
networking-odl driver at the time of Subnet creation.
Additionaly an ARPResponder flow is also introduced to
service the ARP requests for these ports during VM
DHCP renewal.

All ArpResponder handling for Router interface gateway,
floating IP and DHCP ports will be moved to ElanService,
introducing a pipeline change for ARP handling.

LPort Dispatcher Table(17) -> ARP Check Table(43) -> ARPResponder Group
-> ELAN Base Table(48), ARP Responder Table(81), Controller
-> Egress Dispatcher Tabel (220)

Change-Id: If1c787c50bd3054766caaa6b11e6c8023402cce4
Depends-On: I2dce5e253d3c94180dd18e51125c5c18170b5c69
Signed-off-by: Achuth Maniyedath <achuth.m@altencalsoftlabs.com>
Signed-off-by: Vijayalakshmi Chickkamenahalli Nagaraju <vijayalakshmi.c@altencalsoftlabs.com>
Signed-off-by: karthik.p <karthik.p@altencalsoftlabs.com>
6 years agoBug 8960: port information for 1 dpn is missing in subnet-op-data and 12/61412/5
HANAMANTAGOUD V Kandagal [Wed, 9 Aug 2017 09:20:35 +0000 (14:50 +0530)]
Bug 8960: port information for 1 dpn is missing in subnet-op-data and
port-op-data

Upon PL reboot , if southbound event (PortUP) event is received first and
northbound event(OnSubnetAddedToVpn) is received later ,DPN will not be
updated in PortOpData.

Fix :
(1) When northbound event is received , SubnetOpDataEntry is created first
by using clustered wide lock based on subnetId.
Then PortOpDataEntry and subnetToDpn is created.

(2)Incase southbound event is received first,PortOpData entry may not be
available.In such case subnetId is retrieved from Neutron cache and
PortOpData entry will be created by the SubnetInterfaceStateChangeListener
thread.

Change-Id: I92ed4aa801cfcbc2da37366149b7c5f2fba2ed4c
Signed-off-by: HANAMANTAGOUD V Kandagal <hanamantagoud.v.kandagal@ericsson.com>
Signed-off-by: ehvkand <hanamantagoud.v.kandagal@ericsson.com>
6 years agoBump odlparent 2.0.2 to 2.0.4 46/61346/4
Stephen Kitt [Tue, 8 Aug 2017 16:14:07 +0000 (18:14 +0200)]
Bump odlparent 2.0.2 to 2.0.4

Change-Id: I5e1f577b3aea966b2340a89eb4010707e27f2628
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoBug 8863: NPE at VpnFloatingIpHandler 54/60554/3
karthikeyan [Wed, 19 Jul 2017 09:12:03 +0000 (14:42 +0530)]
Bug 8863: NPE at VpnFloatingIpHandler

Problem Description:
=======================
The following exception was observed from VpnFloatingIpHandler in CSIT

Error in generate label or fib install process
java.lang.NullPointerException: Supplied value may not be null
org.opendaylight.netvirt.natservice.internal.VpnFloatingIpHandler.lambda$onAddFloatingIp$0(VpnFloatingIpHandler.java:194)[307:org.opendaylight.netvirt.natservice-impl:0.5.0.SNAPSHOT]

Solution:
=========
We need to enhance the pre-condition check in VpnFloatingIpHandler before
proceeding with any DNAT flow installation.

Have added the required null check for floatingIp ADD/REMOVE methods.

Change-Id: Ic516f8afc325a1e6eb515481abb2d0fef411336a
Signed-off-by: karthikeyan <karthikeyan.k@altencalsoftlabs.com>
6 years agoBug 8962: Fix non-parameterized LOG statements as per guidelines 25/61425/2
HANAMANTAGOUD V Kandagal [Wed, 9 Aug 2017 13:08:16 +0000 (18:38 +0530)]
Bug 8962: Fix non-parameterized LOG statements as per guidelines

Non parameterized LOG statement are suspected to take more CPU cycles than
parameterized one. Hence all non-parameterized logs are enhanced.

Also some more log enhancement for better debuggability.

Change-Id: I60d258aeb30ecd4c8442e7a2e6316b21844bb3e5
Signed-off-by: HANAMANTAGOUD V Kandagal <hanamantagoud.v.kandagal@ericsson.com>
6 years agoDocs: add supported combinations 39/60839/5
Sam Hague [Thu, 27 Jul 2017 21:13:05 +0000 (17:13 -0400)]
Docs: add supported combinations

Change-Id: I74bb7ec19059d44238c6449180c745cba11e149c
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoBug 8958: Java Null pointer exception for display vpn-config after 02/61402/2
HANAMANTAGOUD V Kandagal [Wed, 9 Aug 2017 07:56:01 +0000 (13:26 +0530)]
Bug 8958: Java Null pointer exception for display vpn-config after
deleting a vpn from CLI

When no VPN configuration is present in CONFIG datastore , success was
being returned in GetL3VPNOutput RPC. This lead to null ptr exception.

Now error message is being returned in RPC which is handled appropriately
and null ptr exception is avoided.

Change-Id: I04bce7a07cd933decf11de11e86ea958d26b7b86
Signed-off-by: HANAMANTAGOUD V Kandagal <hanamantagoud.v.kandagal@ericsson.com>
6 years agoBug 8882 - With conntrack SNAT communication with PNF fails 81/61381/4
Aswin Suryanarayanan [Tue, 8 Aug 2017 17:38:49 +0000 (23:08 +0530)]
Bug 8882 - With conntrack SNAT communication with PNF fails
Changed set_field to load action and set only the relevent bits and
other bits are preserved.

Depends on https://git.opendaylight.org/gerrit/#/c/61378/

Change-Id: I119b4daf214be796bfbc8a23fe3b09c81377a8c2
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
6 years agoBug 8937 : High CPU utilization of Java process due to SNAT packet looping 52/61252/4
cgowdru [Mon, 7 Aug 2017 07:26:19 +0000 (12:56 +0530)]
Bug 8937 : High CPU utilization of Java process due to SNAT packet looping

Description:
If we have 2 VMs with same IP belong to two different network and the
subnet associated with different routers having same external network and
external bgpvpn. In such as case, when traffic initiated using same
internal port some both the VMs, one of the VMs doesn't undergo SNAT
translation and the packet gets continously looped between Controller and OVS.

When the packet is punted to controller, check is only done if the packet
is already recevied for an given internal-ip and internal-port. As a
result, VM1 packet is processed properly and SNAT translation happens. But
when VM2 packet arrives, we see with internal-ip and internal-port already
processed and hence we sent back to OVS without SNAT translation which
resulted in looping.

Change done to have a check of router-id along with internal-ip and
internal-port to uniquely differentiate VM1 and VM2 traffic seperatly and
perform SNAT translation properly for both.

Change-Id: I29b6aef96f353bef711f3fb2c1f0b9f6d75507a6
Signed-off-by: cgowdru <chetan.arakere@altencalsoftlabs.com>
6 years agoELAN service is not unbound when nova delete followed by neutron port delete 47/60447/2
Periyasamy Palanisamy [Mon, 17 Jul 2017 07:03:27 +0000 (12:33 +0530)]
ELAN service is not unbound when nova delete followed by neutron port delete

* Fix added to listen on interface config remove and invoke unbind service
* Changed elan interface job key while submitting to jc

Change-Id: I0cf8e29fa4afdc1dcf050198e8296071bd90efac
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
6 years agoBUG 8883 : LOG enhancement for NAT service module 60/60760/9
cgowdru [Wed, 26 Jul 2017 07:00:11 +0000 (12:30 +0530)]
BUG 8883 : LOG enhancement for NAT service module

1) In most of the logs, "NAT Service" is used as a prefix. Since logs
already has the package Name, it would be better to print method name
instead of prefix.

2) Many logs have have string concatenated instead of passing as
parameters in these statement.

Change-Id: Ie41b7e113d4a7d291255dbc81148e21a6156f8c2
Signed-off-by: cgowdru <chetan.arakere@altencalsoftlabs.com>
6 years agoBug 7545 - FIP-FIP traffic 91/60991/7
Aswin Suryanarayanan [Tue, 1 Aug 2017 13:28:08 +0000 (18:58 +0530)]
Bug 7545 - FIP-FIP traffic
between vm in same n/w in same compute is not working in stateful SG
mode.

The patch fixes the FIP-FIP use case.
Add a dummy table to do a ct_lookup if the packet was already send to
the netfilter from the pipeline.

Change-Id: Ibc0d30aa1315d67938ebcbaddcfa2593113f9686
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
6 years agoBUG 8876 - Fix to remove ELAN interface flows when external network deleted 83/61383/1
Vinh Nguyen [Thu, 3 Aug 2017 19:14:37 +0000 (12:14 -0700)]
BUG 8876 - Fix to remove ELAN interface flows when external network deleted

    - Problem: when deleting external network, the underlying ietf
      Interface might have been removed from the config DS prior
      to the call to delete the ELAN interface. As a result, the call
      interfaceManager.getInterfaceInfo returns null and the
      subsequent call to delete the ELAN interface fails to delete the
      flow entries for external network's ELAN interface.

    - Fix: invoke interfaceManager.getInterfaceInfoFromOperationalDataStore
      when delete External Network's ELAN interface

Change-Id: I764f3516d34a6d79aacff8dbedabb55219799ac9
Signed-off-by: Vinh Nguyen <vinh.nguyen@hcl.com>
6 years agoBug 8936: Fix IPv6 IPAM issues when an IPv6 subnet is added to IPv4 network 51/61251/3
Sridhar Gaddam [Mon, 7 Aug 2017 06:55:35 +0000 (12:25 +0530)]
Bug 8936: Fix IPv6 IPAM issues when an IPv6 subnet is added to IPv4 network

This patch addresses the following issues in ipv6service.

1. In an existing IPv4 network (which has a DHCP Port and some VMs)
   when you add an IPv6 subnet, the VMs/DHCP Port is not configured
   with the IPv6 address.
2. Similarly, in a multi-node setup when an IPv6 subnet is added to
   an existing IPv4 network and associated to the router, sometimes
   the necessary punt flows in Table_45 are not configured.

Change-Id: I0c91d40ae692f32567bc77f778d77af278e0b663
Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
6 years agoRevert "Bug 8882 - With conntrack SNAT communication with PNF fails " 88/61288/2
Sam Hague [Mon, 7 Aug 2017 17:08:23 +0000 (17:08 +0000)]
Revert "Bug 8882 - With conntrack SNAT communication with PNF fails "

This reverts commit 0a1048ddc55621b2b675b7cef3e1b6c808693af1.

Change-Id: Ia0522b4c5f30dc11995bbe5e043d66f41f490cb7
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoBug 8789 - Designated DHCP DPN is missing. 69/59869/7
eaksahu [Mon, 3 Jul 2017 12:15:38 +0000 (17:45 +0530)]
Bug 8789 - Designated DHCP DPN is missing.

When l2gw connection is creaated and first dpn interface creation
happens at about same time there is a race in dhcp designated listener
which thinks that it has to update mcast only if there are no dpns in
elan.

when an elan dpn is removed, the dpns tep ip should not be removed from
mcast mac if that tep ip is the designated dpn tep ip.

when l2gw is deleted clear its connections also.

Change-Id: I6a216cecc609ba75f10ebfc750e492348e447122
Signed-off-by: eaksahu <a.k.sahu@ericsson.com>
6 years agoAdd chain egress classifier support 64/60764/5
Jaime Caamaño Ruiz [Fri, 14 Jul 2017 17:10:51 +0000 (19:10 +0200)]
Add chain egress classifier support

On scenarios where origin and destination of traffic are on the same
node, there is no tunnel id metadata to help steer the traffic back
to the destination on chain egress, thus SFC cannot take care of
this by itself. In a general case, the classifier is in a better
position to steer traffic to destination as it is aware on how it
was intercepted on the first place.

For netvirt classifier and the scenario mentioned above, the
classifier will copy the REG6 to NSH C4 on interception. On chain
egress, SFC will send the encapsulated packet back to the origin node
(only when C2 is 0, which will only happen when origin and destination
node are the same). There, the classifier will restore the
de-encapsulated packet to the egress dispatcher table with the proper
REG6 value taken from NSH C4. REG6 contains the the egress ifindex plus
the nex egress service in sequence from the classifier egress service
to handle the packet. This effectively restore the packet processing
where it left off on interception.

Change-Id: I1c494f24c5af530849faabcbfa8efcaa9cd4344a
Signed-off-by: Jaime Caamaño Ruiz <jaime.caamano.ruiz@ericsson.com>
6 years agoFix some logs 67/61067/3
David Suarez [Wed, 2 Aug 2017 18:38:31 +0000 (20:38 +0200)]
Fix some logs

Fix some logs.

Change-Id: I9a72aa7ec1563305596370528f70653eae2ff9ae
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
6 years agoReplace size()==0 by isEmpty() 98/61198/2
David Suarez [Fri, 4 Aug 2017 18:46:48 +0000 (20:46 +0200)]
Replace size()==0 by isEmpty()

Replace size()==0 by isEmpty(). It improves readability and avoid "=0".

Change-Id: I60f975639d32ba7f2c317779b7af5beb2f92ed1a
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
6 years agoBug 8882 - With conntrack SNAT communication with PNF fails 71/60871/4
Aswin Suryanarayanan [Fri, 28 Jul 2017 12:19:23 +0000 (17:49 +0530)]
Bug 8882 - With conntrack SNAT communication with PNF fails

Change set_field to load action and set only the relevent bits. Thus the
lport tag is preserved.

Depends on [1] https://git.opendaylight.org/gerrit/#/c/60870

Change-Id: I769254de971deed02cf510ee62db08c3d887070e
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
6 years agoBUG 8914: Fix NPE in sfc.classifier-impl 58/61158/2
Jaime Caamaño Ruiz [Mon, 31 Jul 2017 14:56:09 +0000 (16:56 +0200)]
BUG 8914: Fix NPE in sfc.classifier-impl

NPE was due ACLs with no RedirectToSfc action. Such ACLs should be
ignored.

Change-Id: If4eb944308db5432919da1c5df8b00469a5df561
Signed-off-by: Jaime Caamaño Ruiz <jaime.caamano.ruiz@ericsson.com>
6 years agoBug 8346 - Conflicting modification for vpnNextHops. 29/59229/22
eupakir [Wed, 2 Aug 2017 13:47:58 +0000 (19:17 +0530)]
Bug 8346 - Conflicting modification for vpnNextHops.

The VpnInstanceListener used to wait for the vpn Interface Operational
data to clean up, before cleaning up data stores related to it.
There was a max wait time calculate, but some time interface op cleanup is
exceeding this wait time. As a result, the vpn instance related cleanup is
done before or at the same time as the vpn interface op cleanup,
resulting in these exceptions.
This fix remove the timed wait for the vpn instance, and cleans up the vpn
data based on notifications fired when both a vpn instance delete is
orchestrated and its footprint is cleared

Change-Id: I54d6369f30aa6d2a0e98df56b80cfcd6b4295978
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoCleanup 45/61045/1
David Suarez [Wed, 2 Aug 2017 14:51:15 +0000 (16:51 +0200)]
Cleanup

- Replace ArraList by List
- Add override
- Declaration of constants
- Replace size() by isEmpty()

Change-Id: Iefc721ded2ef21e7da9fc59b36e1195e47d77f08
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
6 years agoBug 8917 - CSIT Sporadic failures - Arp learning suite - missing flow on 71/60971/3
eupakir [Tue, 1 Aug 2017 08:25:24 +0000 (13:55 +0530)]
Bug 8917 - CSIT Sporadic failures - Arp learning suite - missing flow on
compute node

Remote FIB Flow installation was failing due to OptimisticLockException.
The DJCs involved in this operation is now modified in the L3 Application
to retry on failure.

Change-Id: Ifdb4d3735892de28fb73b6b563878d059d8298ee
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
6 years agoBug 8875 - fix in handleNeutronPortUpdated 50/60650/8
Valentina Krasnobaeva [Thu, 20 Jul 2017 14:01:30 +0000 (16:01 +0200)]
Bug 8875 - fix in handleNeutronPortUpdated

This fixes commit "Bug 6770 - Fixes DjC for NPortCL + snmaps serialized
+ listed changes" 19af79aecc2f217c01faeda721606a77bd1b2504.

NeutronPortChangeListener: handleNeutronPortUpdated method receives
portoriginal and portupdate objects as arguments. So, to check, if
neutron port was really updated, compare portoriginal and portupdate
SubnetIDs.

Change-Id: I7509c61bfa1135e21fa8e0a49ca8e0f1c68d4c72
Signed-off-by: Valentina Krasnobaeva <valentina.krasnobaeva@6wind.com>
Acked-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoBug 8439: Handling interface update event for ECMP extra routes. 26/57326/2
eceghkl [Thu, 18 May 2017 05:43:35 +0000 (11:13 +0530)]
Bug 8439: Handling interface update event for ECMP extra routes.

* Up/Down event from Interface state was not handled before this fix.
  Only add and delete event were handled

* With this fix, up/down events are handled. These events are processed
  similar like add/delete events. Vpntoextraroute, extraroute-rds and
  fibentries are updated accordingly which will result in the bucket
  removal/addition from the select group. For the last extraroute of a
  particular prefix, the corresponding flow(table 21) and select group
  are removed

Change-Id: Ieb205ff9e626c67c888ecdf3d5bfbcc679fdeba8
Signed-off-by: eceghkl <manu.b@ericsson.com>
6 years agoBug 8884: SNAT traffic is getting dropped when router gateway is removed 30/60730/2
karthikeyan [Tue, 25 Jul 2017 11:39:55 +0000 (17:09 +0530)]
Bug 8884: SNAT traffic is getting dropped when router gateway is removed

Problem Description:
====================
Issue 1
+++++++

SNAT traffic is getting dropped for second router when gateway is removed
from first router.

Consider the following topology.

1) 2 Internal Network + 2 Subnets
2) 2 Routers with each subnet associated to it.
3) One External network and both router associated to same External
Network.
4) One External BGPVN.

when both Routers, if the same NAPT switch is elected, it will have a
common NAPT PFIB TABLE which forwards the outgoing packet. In such
scenario, when the gateway is removed for one of the routers,
this flow gets removed effecting the other routers traffic.

Solution for Issue 1:
+++++++++++++++++++++
Changes done to prevent this NAPT PFIB table flow(47->21) deletion if
there exists
any other router having same DPN as NAPT Switch.

Issue 2:
++++++++
Label of external-fixed-ip is freed from vpnservice pool when NAPT
switchover happens for SNAT.

Solution for Issue 2:
+++++++++++++++++++++
Changes done to prevent release of label allocated for external-fixed-ip
when Switch-Over Happens.

Change-Id: I0d34ee1140f0d2b800d82271b6f0604bbb8bb9c1
Signed-off-by: karthikeyan <karthikeyan.k@altencalsoftlabs.com>
6 years agoBug 8632: ECMP LB group not updated during tunnel events 24/60924/1
eceghkl [Thu, 29 Jun 2017 05:28:53 +0000 (10:58 +0530)]
Bug 8632: ECMP LB group not updated during tunnel events

* Tunnel State is read from interface operational DS before installing
  select group
* A few NPE also fixed in this review

Change-Id: Id61c20059fcf4dff16f7590b0c439330bb2c46c3
Signed-off-by: eceghkl <manu.b@ericsson.com>
6 years agoRevert "Revert "Bug 8864: DNAT to SNAT traffic is getting failed on same DPN for... 97/60897/2
Sam Hague [Sat, 29 Jul 2017 00:51:24 +0000 (00:51 +0000)]
Revert "Revert "Bug 8864: DNAT to SNAT traffic is getting failed on same DPN for VXLAN""

This reverts commit d81c93c38d9cf09236a735f9f18e49822bead43b.

Change-Id: If863f8ced3098c10209456e2927a7e0810d3ad60
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoRemove not needed Thread.sleep() from aclservice component tests 16/60216/3
Michael Vorburger [Tue, 11 Jul 2017 20:42:48 +0000 (02:12 +0530)]
Remove not needed Thread.sleep() from aclservice component tests

Change-Id: Id3582518e28cc5f523027f806b77aa46cbd32204
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoBug 8838: aclservice NPE's 58/60758/3
Shashidhar Raja [Wed, 26 Jul 2017 05:06:11 +0000 (10:36 +0530)]
Bug 8838: aclservice NPE's

This commit fixes NPE observed in processInterfaceUpdate().
Similar fix added in applyAce() and removeAce().
Also, unwanted check taken out from updateRemoteAclTableForMultipleAcls().

Change-Id: I895af6b8c59a85400b714c007dab5b03630d93cf
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
6 years agoRevert "Bug 8864: DNAT to SNAT traffic is getting failed on same DPN for VXLAN" 26/60826/2
Sam Hague [Thu, 27 Jul 2017 17:08:07 +0000 (17:08 +0000)]
Revert "Bug 8864: DNAT to SNAT traffic is getting failed on same DPN for VXLAN"

This reverts commit e88336d0b929975f84beb448f5fd08e9233dcf9f.

Change-Id: Ife85e4644ba144f7e11c1ad1e017beb98e37a756
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoBUG 8476 Fix checkstyle error 34/60834/1
Victor Pickard [Thu, 27 Jul 2017 19:00:07 +0000 (15:00 -0400)]
BUG 8476 Fix checkstyle error

Fix checkstyle error

Change-Id: Ide6f1cd3d5946340ea968113d971bd53b79e49dc
Signed-off-by: Victor Pickard <vpickard@redhat.com>
6 years agoBug 8476 Add support for logical switch replication mode 11/57211/7
Victor Pickard [Tue, 16 May 2017 20:34:35 +0000 (16:34 -0400)]
Bug 8476 Add support for logical switch replication mode

With OVS 2.6, the Logical Switch table, in the hardware_vtep schema, has
a new field, replication_mode. This bug will be used to add support to
netvirt, ovsdb, and genius for setting the replication_mode of logical
switches. The default will be for ODL to set the replication_mode
to "source_node" when creating logical switches.

Refer to [1] for more details on replication_mode.

[1] http://openvswitch.org/support/dist-docs/vtep.5.html

This patch depends on genius patch:
https://git.opendaylight.org/gerrit/#/c/57210/

Change-Id: I8581fa3bbc1af7c8d13bed2d66e351d020366ea3
Signed-off-by: Victor Pickard <vpickard@redhat.com>
6 years agoBug 8892 - LOG.error format error(VpnManagerImpl.java:176) 54/60754/1
Freeingo Sure [Wed, 26 Jul 2017 03:32:35 +0000 (11:32 +0800)]
Bug 8892 - LOG.error format error(VpnManagerImpl.java:176)

Change-Id: Ic1c88364cb04a5226f4cf3d7d32c8125db5508f7
Signed-off-by: Freeingo Sure <xiao.fenggang@zte.com.cn>
6 years agoBug 8864: DNAT to SNAT traffic is getting failed on same DPN for VXLAN 34/60534/5
karthikeyan [Tue, 18 Jul 2017 12:44:21 +0000 (18:14 +0530)]
Bug 8864: DNAT to SNAT traffic is getting failed on same DPN for VXLAN

Problem Description:
=========================
DNAT to SNAT traffic is getting failed on same hypervisor for External
VXLAN Provider Type

Solution:
===========
Have added the follwing flow install/remove code to handle this problem
for external VXLAN provider type (EVPN_RT5)

Install the flow L3_FIB_TABLE (table=21)-> INBOUND_NAPT_TABLE (table=44)
(FIP VM on DPN1 is responding back to external fixed Ip on DPN1 itself.
ie. same Hypervisor){DNAT to SNAT Intra DC traffic}

Change-Id: Id6670876a42ab0a7e89abee705bb0848a642e8df
Signed-off-by: karthikeyan <karthikeyan.k@altencalsoftlabs.com>
6 years agoBUG 8880: Trunk port flows not created for subports 08/60708/2
Vishal Thapar [Tue, 25 Jul 2017 04:24:21 +0000 (09:54 +0530)]
BUG 8880: Trunk port flows not created for subports

Fix for BUG 8020 broke the assumption for trunk sub-ports i.e. Interface
will be already created for Subports at time of NeutronPort creation.

https://git.opendaylight.org/gerrit/#/c/54410/ adds an if condition that
will always be false for VM ports, so we don't create interface at Port
creation. This breaks trunk logic. This also has side effect of increasing
rae conditions by adding too much to do once VM is actually spawned and is
not a good design.

Change-Id: I90e5c60f6d5afe5242cdd0a93d5c35d00a25ab85
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
6 years agoRemove derivation from controller config-parent 62/60662/3
Tom Pantelis [Sat, 22 Jul 2017 16:49:53 +0000 (12:49 -0400)]
Remove derivation from controller config-parent

Netvirt does not use the config subsystem so does not need to
derive from controller config-parent. I removed the local
config-parent and changed poms to derive from the local
binding-parent.

Change-Id: Ib6ab82d43a021247808f17cefb8d836e5b00b36e
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoBug 8853 - In conntrack SNAT , FIB flows are not created for existing 51/60451/3
Aswin Suryanarayanan [Mon, 17 Jul 2017 07:27:28 +0000 (12:57 +0530)]
Bug 8853 - In conntrack SNAT , FIB flows are not created for existing
Non-NAPT switch ports.

When a port is added to the VpnDpnList it is not checked whether it is a
first/last port and handle the fib flows.

VpnFootprint service Api is now used to handle the last port and
add/delete the fib flows.

Change-Id: Iea809bad856846aaad623bd4c49f4b0f0642982b
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
6 years agoBug 8753 : Changes to create bgpvpn without VPN target 57/60657/2
eswanit [Thu, 20 Jul 2017 14:30:13 +0000 (20:00 +0530)]
Bug 8753 : Changes to create bgpvpn without VPN target

When bgpvpn is created without VPN targets, it throws
an error as "GetVPN failed due to null" in VPN config.

This is fixed by adding a check of, if VPN target is
null, then also create VPN by avoiding the exception.

Change-Id: I08179cc7a7e9013be7008e0514b98e9e0edc3bd9
Signed-off-by: eswanit <swati.udhavrao.niture@ericsson.com>
6 years agoBug 8841 : add fib-show option to select entries per address-family or prefix 77/60277/6
Noel de Prandières [Mon, 10 Jul 2017 14:50:53 +0000 (16:50 +0200)]
Bug 8841 : add fib-show option to select entries per address-family or prefix

An enhancement of fib-show is done here to show optionally prefixes
based on address-families or/and prefix/subnet value given in input.
Available values for address-families are : ipv4, l2vpn, ipv6.
Available values for prefix/subnet are IPv4 or IPv6 entries, with or without
prefix length.

Change-Id: I8d1c61149bae7442221dea5b0d04aae0de59f9b5
Signed-off-by: Noel de Prandières <prandieres@6wind.com>
6 years agoBug 8683: Aclservice releaseId IdManager Exception 54/60654/1
Tarun Thakur [Tue, 4 Jul 2017 09:50:16 +0000 (15:20 +0530)]
Bug 8683: Aclservice releaseId IdManager Exception

Issue: When VM port is deleted, ACL service calls IDManager to release ID
which in turn throws exception that Id Entries does not exist.

Root cause:
When OVS is restarted, then ACL pools are deleted and created freshly
due to which IDs allocated to SG flows of VM port before OVS restart are
not available in IdManager ACL pools after OVS restart.

Fix:
On OVS restart, Do not delete ACL pools for OVS if VM ports are associated with OVS.

Change-Id: I0a0d36d4d8f25d7157d73292f9a027f67fe6dc0c
Signed-off-by: Tarun Thakur <tarun.t@altencalsoftlabs.com>
(cherry picked from commit f2ddba6f5526e232125180185170e84319d97f7a)

6 years agoMove statistics into org.opendaylight.netvirt 70/60570/2
Stephen Kitt [Wed, 19 Jul 2017 15:25:19 +0000 (17:25 +0200)]
Move statistics into org.opendaylight.netvirt

Now that the BluePrint plugin only considers org.opendaylight.netvirt,
we need to move all NetVirt’s packages into that namespace.

Change-Id: I953e9df0a9c650161083239acb1889e529429f1a
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoClean up lambdas and streams 04/59104/9
Stephen Kitt [Fri, 16 Jun 2017 16:36:38 +0000 (18:36 +0200)]
Clean up lambdas and streams

* Use method references where appropriate.
* Use lambdas instead of anonymous classes where appropriate.
* Simplify lambdas as far as possible.
* Use forEach() directly on collections instead of streaming them.
* Simplify streaming matchers (!anyMatch -> noneMatch in particular).

Change-Id: I38c4ec0b45d355d495b9db563cb363414059f1aa
Signed-off-by: Stephen Kitt <skitt@redhat.com>