netvirt.git
8 years agoBug 8023 Handling ELAN remote DMAC programming correctly 88/53588/8
Periyasamy Palanisamy [Mon, 20 Mar 2017 16:59:28 +0000 (22:29 +0530)]
Bug 8023 Handling ELAN remote DMAC programming correctly

* Fixing the issue related to synchronization key for programming remote
dmac entry
* code cleanup while handling tunnel add DCN
* added required info logs to collect the logs to know about possible
races. Will get it removed once this issue is completely solved.

Change-Id: I82d3cc1a44696d9dfae531fac818295ba75d28a9
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
8 years agoBug 7606: Fix for missing table 110 flow in OVS 2.4 after VM live migration 77/53477/5
arthi.b [Sat, 18 Mar 2017 03:20:49 +0000 (23:20 -0400)]
Bug 7606: Fix for missing table 110 flow in OVS 2.4 after VM live migration

Problem:
After live-migration of VM is completed, table 110 flow for migrated
instance missing in all nodes.

Fix:
* Skipped UPDATE event of Source OVS when VM is migrated.
* Skipped the cache update from UPDATE event.

Change-Id: Iddc15a38fc8c96e998a14622217957dcabdff438
Signed-off-by: arthi.b <arthi.b@hcl.com>
8 years agoBug 7778: VM's FIP are not able communicate to each other 88/51788/12
vinoth [Mon, 13 Feb 2017 19:32:45 +0000 (01:02 +0530)]
Bug 7778: VM's FIP are not able communicate to each other
in external network provider

Problem: NORMAL instruction support need to be removed
from legacy netvirt

Soultion: Added a separate flow for broadcast, multicast, unicast of
internal to external communication

Change-Id: Ifc7dec023511395b6a7d2f671b8350886ff11297
Signed-off-by: vinoth <m.vinoth@hcl.com>
8 years agoBug 8165 - Learnt IP route does not reappear on DC-GW after OVSRestart 52/54452/2
eupakir [Thu, 6 Apr 2017 20:04:57 +0000 (01:34 +0530)]
Bug 8165 - Learnt IP route does not reappear on DC-GW after OVSRestart

On OVS Restart, a learnt IP will have to be deleted by Liveness
Monitor, and then re-learnt once the OVS comes up.
But this IP was not learned again.

Cyclic events were getting spawned while processing removal of
Learnt IPs.  This was causing deletion of re-learnt IPs.

Change-Id: I17b87fef05de8d3eb51f2a4720df98ff647e8937
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
8 years agoBug 7922 - Use counter to keep track of duplicate flow entries 16/52816/8
Vinh Nguyen [Sun, 5 Mar 2017 03:49:54 +0000 (19:49 -0800)]
Bug 7922 - Use counter to keep track of duplicate flow entries

Problem: Single flow entry associated with two more security rules
incorrectly deleted when one of the security rule is deleted.

Fix: Use counter to keeps track of duplicate security rules
in a particular VM. The counter is maintained in the flow cookie.
When writing a security flow, the flow counter is incremented
if the flow already exists, otherwise the flow cookie is set to '1'.
When removing a security flow, if the counter value is '1',
the flow is removed from the node, otherwise the flow counter is
decremented.

This changeset also:
- reversed some previous partial fixes for the same problem.
- refactor common Acl Service to AbstractAclService
- reformat/clean up code

Change-Id: Idfec36fa47c88db76a8382f8fcbc65c4100e9e6e
Signed-off-by: Vinh Nguyen <vinh.nguyen@hcl.com>
8 years agoBug 7939 - Remote flows missing in Table 21 61/54361/2
Vivekanandan Narasimhan [Wed, 5 Apr 2017 13:31:29 +0000 (19:01 +0530)]
Bug 7939 - Remote flows missing in Table 21

Due to racing between createRemoteFibEntry() invocations
from multiple DJCs of different keys within VRFEntryListener,
when two threads try to create the same remote flow, it lands
up as OptimisticLockFailedException and that results in none
of these threads write showing up in the flow-inventory.

With this patch we donot eliminate the race, but rather attempt
to reduce the invocations to createRemoteFibEntry there reducing
the occurrence of the problem.

Changing Keys in VRFEntryListener requires more careful thought
as these keys not only protect DS writes but also bring in
batching at scale.   And so that part has to be addressed in a
different review.

Change-Id: I7bf80742980002b471520fc3e50ed1c28baa1945
Signed-off-by: Vivekanandan Narasimhan <n.vivekanandan@ericsson.com>
8 years agoBug 7939, 7938, 7968, 7997: Potential fix for the four L3VPN bugs 72/53772/2
Abhinav Gupta [Fri, 24 Mar 2017 07:04:05 +0000 (12:34 +0530)]
Bug 7939, 7938, 7968, 7997: Potential fix for the four L3VPN bugs

While creating LocalFibEntry, localDpnId list is being returned empty
leading to local FIB entry not getting installed. The fix ensures we log
an error statement in case it happens

Change-Id: I95589523079f9d990b5e61d96b71b2c6d1c133e1
Signed-off-by: Abhinav Gupta <abhinav.gupta@ericsson.com>
8 years agoBug 7939: VpnService Suite and Tempest failures 72/54272/3
Vivekanandan Narasimhan [Tue, 21 Mar 2017 18:02:58 +0000 (23:32 +0530)]
Bug 7939:  VpnService Suite and Tempest failures

This fix is an add-on patch for the below review

https://git.opendaylight.org/gerrit/#/c/53772/

and is in a direction to solve the OperTxn gets
failing when configTxn changes are triggered.

Also we fix here the routerInterface VrfEntry
management such that when we clearly know its a
router-interface VRFEntry, we donot do any further
processing than what is required for the same.

Change-Id: I8efc5c41f26e9e6dd04c8638b2cfaa94a2050384
Signed-off-by: Vivekanandan Narasimhan <n.vivekanandan@ericsson.com>
8 years agoBug 8019: when the neutron port acting as gateway is deleted, invisible ip 52/53652/2
HANAMANTAGOUD V Kandagal [Wed, 22 Mar 2017 06:42:20 +0000 (12:12 +0530)]
Bug 8019: when the neutron port acting as gateway is deleted, invisible ip
is not removed from FIB

When VpnInterface has a secondary adjacency like invisible ip,
if tunnel EP is deleted , VpnInterface Op DS is updated with
empty nexthoplist. During this time , invisible ip goes missing from
VpnInterface Op DS due to MDSAL.syncwrite() being done in
updateVpnInterfaceOnTepDelete.

Another fix being done here is , invisible ip FIB entry is
updated with empty nexthop and route is withdrawn/advertized to BGP.

Change-Id: If98991940976defe16a7a988aa3071d87693f8e9
Signed-off-by: HANAMANTAGOUD V Kandagal <hanamantagoud.v.kandagal@ericsson.com>
8 years agoBug 7816: NullPointerException while create a router in external network provider 81/52481/9
hari.pr [Wed, 1 Mar 2017 14:53:18 +0000 (20:23 +0530)]
Bug 7816: NullPointerException while create a router in external network provider

 * Problem:  Patch port for br-ex is not updated with port name = "patch-ex" into
             localcache during stack up for follower node, thus NullpointerException.
 * Solution: Patch port name is constructed by passing external bridge name and
             as it was constructed on fly in getPatchPortName() in VLANProvider.java,
             patch port name entry was not stored in 'patchPortNames' map.
             However, 'patchPortNames' map will have default value as "patch-ext" for
             patch port name.Default value will be used
             when 'ovsdb.l3.fwd.enabled=yes' in custom properties file.

Change-Id: I9e446529c1962b41c9e97644d59a35dea4606740
Signed-off-by: hari.pr <hari.pr@hcl.com>
8 years agoFix ACL IPv6 flows to match on ipv6_src/ipv6_dst for remote SG 91/54191/2
Sridhar Gaddam [Fri, 17 Mar 2017 12:08:50 +0000 (17:38 +0530)]
Fix ACL IPv6 flows to match on ipv6_src/ipv6_dst for remote SG

Conflicts:
    vpnservice/aclservice/impl/src/main/java/org/opendaylight/netvirt/aclservice/utils/AclServiceOFFlowBuilder.java

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

8 years agoBug 7952: ACLService to treat Ethertype=IPv6 and Protocol=icmp as a request for ICMPv6 92/53992/2
Sridhar Gaddam [Fri, 10 Mar 2017 12:36:26 +0000 (18:06 +0530)]
Bug 7952: ACLService to treat Ethertype=IPv6 and Protocol=icmp as a request for ICMPv6

In Neutron, "Protocol=icmp" is allowed to be configured with "Ethertype=IPv6"
for backward compatibility reasons. When such a rule is configured, Neutron
IPTables Firewall Driver (i.e., reference implementation) treats this as a
request for ICMPv6 and configures a rule accordingly. This patch implements
the same thing in ACLService. Please refer to the bug report for more details.

Conflicts:
    vpnservice/aclservice/impl/src/main/java/org/opendaylight/netvirt/aclservice/utils/AclServiceOFFlowBuilder.java

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

8 years agoBug 7979: Fix issue where VM is unable to acquire address during IPv6 tests 77/53977/2
Sridhar Gaddam [Thu, 16 Mar 2017 08:47:50 +0000 (14:17 +0530)]
Bug 7979: Fix issue where VM is unable to acquire address during IPv6 tests

Tempest IPv6 Scenario tests validate usecases like IPAM, multi_prefix,
dualnetworks etc. While running IPv6 tempest scenario tests, we have
noticed some exceptions, because of which the test-cases are failing.
This patch fixes those exceptions in the file ExternalRoutersListener,
by skipping the IPv6 subnets. The necessary implementation in
ExternalRoutersListener will be added as part of IPv6 external
connectivity blueprint.

Conflicts:
   natservice/natservice-impl/src/main/java/org/opendaylight/netvirt/natservice/internal/ExternalRoutersListener.java

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

8 years agoBug 7913: QosInterfaceStateChangeListener IllegalArgumentException 75/53975/3
A Vamsikrishna [Fri, 10 Mar 2017 06:50:36 +0000 (12:20 +0530)]
Bug 7913: QosInterfaceStateChangeListener IllegalArgumentException

Fixed it by avoiding IllegalArgumentException through regexp check.

Cherry picked from commit 3b317e85ff698818e8fba1863d69fe2651685f0e
from master's c/53118, but significantly reworked, because the code
has moved.

Change-Id: I8c474eae6629a7219a524a5de3cd92e087c6e746
Signed-off-by: A Vamsikrishna <a.vamsikrishna@ericsson.com>
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
(cherry picked from commit 3b317e85ff698818e8fba1863d69fe2651685f0e)

8 years agoMigrate l3vpn service docs to netvirt 23/53623/2
Colin Dixon [Tue, 14 Mar 2017 20:28:36 +0000 (16:28 -0400)]
Migrate l3vpn service docs to netvirt

Change-Id: I8686a9b127ea746ecb5bb9031bed70e9fec287d0
Signed-off-by: Colin Dixon <colin@colindixon.com>
(cherry picked from commit c18bf0c265f77329a958b39b8e7b6510f031236e)

8 years agoBug 8023: Making ELAN to use StateTunnelList listener 37/54237/7
Periyasamy Palanisamy [Tue, 28 Mar 2017 07:18:06 +0000 (12:48 +0530)]
Bug 8023: Making ELAN to use StateTunnelList listener

* Currently ELAN uses Interface state DCN for tunnel events to program
remote DMAC and BC group when VxLAN tunnel is created later. So making it
to use listen StateTunnelList
* This change would be useful when ITM supports multiple VxLAN tunnels and
avoid race conditions

Change-Id: Idce3dd3a548b95feadf43fbe2c1311c3fafdb70a
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
8 years agoCorrect several equals() bugs 77/53377/3
Alon Kochba [Wed, 15 Mar 2017 12:20:22 +0000 (14:20 +0200)]
Correct several equals() bugs

Change-Id: I8f008515dc79cdd0c38e957a3917db1ce8d9ab86
Signed-off-by: Alon Kochba <alonko@hpe.com>
8 years agoBumping versions by x.y.(z+1) for next dev cycle 85/54485/1
Anil Belur [Fri, 7 Apr 2017 07:56:41 +0000 (17:56 +1000)]
Bumping versions by x.y.(z+1) for next dev cycle

Change-Id: I620b44d97c0513c38c1ca22c3be76ef31bbabeaa
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
8 years agoBUG-5222: do not pull in odl-mdsal-xsql 63/54163/1
Robert Varga [Fri, 13 Jan 2017 09:07:01 +0000 (10:07 +0100)]
BUG-5222: do not pull in odl-mdsal-xsql

xsql is deprecated, buggy and never was meant for production
use. Do not pull it in.

Change-Id: If247c87058db3d826861dcbcb97be720c27b56f4
Signed-off-by: Robert Varga <nite@hq.sk>
(cherry picked from commit 353131c4307c07a7b3356c3c2e60e2fb5e3b9ec8)

8 years agobug-8046 fix for mac movement issue 52/53452/6
Periyasamy Palanisamy [Wed, 18 Jan 2017 07:31:34 +0000 (13:01 +0530)]
bug-8046 fix for mac movement issue

* updating only elan-interface-forwarding-entries when mac is learned
from vlan provider port which is already learned on VM port.
* updating MACs in elan ds and dpn when MAC is actually moved from VM port
to another VM port.
* handling MAC learning from VLAN provider port if it is a newly learned
mac

Change-Id: I4ff9d79463f0f238c5a8b345438514b93ed4bb17
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
8 years agoBug 7984: IDLE_TIMEOUT check required in onFlowRemoved. 92/53592/2
cgowdru [Tue, 14 Mar 2017 18:10:56 +0000 (23:40 +0530)]
Bug 7984: IDLE_TIMEOUT check required in onFlowRemoved.

Description: When FlowRemoved notification is received,
We are taking care of deleting the INBOUND_NAPT_TABLE entry
and releasing the allocated external port for an external-ip.
This is valid only if onFlowRemoved received due to OUTBOUND_NAPT_TABLE
removed beause of IDLE_TIMEOUT. When Switch goes down, we re-elect
a new NAPT switch and re-install ongoing session flows. It is required
not to release the allocated external port during Switch down, but
should be done only during IDLE_TIMEOUT.

Initially, we have the check but been removed with review
https://git.opendaylight.org/gerrit/#/c/49214/. Also plugin support
to get the RemovedReason was not available with onFlowRemoved.

Now, we have the plugin support to get the removed reason which can be
used. https://git.opendaylight.org/gerrit/#/c/50335/

Change-Id: I5708fbd1755719ea0cdabe29eaf0787076a46f24
Signed-off-by: cgowdru <chetan.arakere@altencalsoftlabs.com>
(cherry picked from commit 97f783b05be80c5a2eb8c3c47c1c63e442082788)

8 years agoBug 7387 : Netvirt: qos policy applied on the network, not applied on 32/53332/6
A Vamsikrishna [Wed, 15 Mar 2017 10:55:18 +0000 (16:25 +0530)]
Bug 7387 : Netvirt: qos policy applied on the network, not applied on
newly created ports of same network

Fix: Handled the scenario of  application of network qos policy to the newly
created port in the add( ) of QosInterfaceStateChangeListener.java

Upstream merged review in master: https://git.opendaylight.org/gerrit/49409

Change-Id: Id3735e89aef600772405dc27118eefe50c54f378
Signed-off-by: A Vamsikrishna <a.vamsikrishna@ericsson.com>
8 years agoBug 7966: Fix route origin for some vrfEntries after VM migration 15/53315/4
Miguel Perez [Thu, 9 Mar 2017 13:39:10 +0000 (14:39 +0100)]
Bug 7966: Fix route origin for some vrfEntries after VM migration

 + It's been observed that when a VM migrates and there are static
   routes pointing to it, as it happens with the CGNAT, the origin
   of these static routes are changed from 'static' to 'local'

Change-Id: I87751263b66080d8200f682b49ac0dd14062bc61
Signed-off-by: Marcos López Samaniego <marcos.lopez.samaniego@ericsson.com>
Signed-off-by: Miguel Perez <francisco.miguel.perez@ericsson.com>
Signed-off-by: Alvaro Gonzalez ARROYO <alvaro.gonzalez.arroyo@ericsson.com>
8 years agoBug 7842: ACL: Arp flows missing in ACL tables for overlapping MAC address 07/52307/4
Shashidhar Raja [Thu, 23 Feb 2017 10:48:01 +0000 (16:18 +0530)]
Bug 7842: ACL: Arp flows missing in ACL tables for overlapping MAC address

Updated to use lport tag with flowname for Egress ACL ARP flows

Change-Id: I9e733b70cb968c16f57253a975b9aa6d74c1d085
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
8 years agoBug 7826: proper elan djc job retries 53/53453/2
Periyasamy Palanisamy [Thu, 9 Mar 2017 06:44:07 +0000 (12:14 +0530)]
Bug 7826: proper elan djc job retries

When ELAN BC programming fails due to TransactionCommitFailedException
then there is no way of retrying djc job due to syncInstall(Delete)Group. It is fixed now and this is very much needed in a scaled setup because of OptimisticLockFailedException on the same group by multiple elan interfaces

Change-Id: Iaa0524edec3f25e0433a91c802f9c8da0d642962
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
(cherry picked from commit 35ebb9adc109743c820abfdc9dd112bea11e8337)

8 years agoBUG:7896 OptimisticLockFailedException 19/53519/2
epgoraj [Wed, 1 Mar 2017 06:54:03 +0000 (12:24 +0530)]
BUG:7896 OptimisticLockFailedException

Change-Id: I977feeb0226613b1a93cfb8092d4afa88926979e
Signed-off-by: epgoraj <p.govinda.rajulu@ericsson.com>
Signed-off-by: Vivekanandan Narasimhan <n.vivekanandan@ericsson.com>
8 years agoBug 7863 - Add Layer 4 Match for flow entries for TCP/UDP security group rule with... 26/52426/4
Vinh Nguyen [Tue, 28 Feb 2017 22:08:03 +0000 (14:08 -0800)]
Bug 7863 - Add Layer 4 Match for flow entries for TCP/UDP security group rule with no min/max

The methods Ingress/EgressAclService::ingress/egressAclTcp/Udp
incorrectly assume that portRangMin/Max values are always specifed.
This is not true when using openstack command lines to
define SG rule for TCP/UDP with no min/max ports specified.
As a result, no layer 4 match are added to the flow entries.

The fix is to add logic to handle null min/max values for the
above scenarios.

Change-Id: I537f51fdd56d8aca3711a38cd5fd2c5eba5d9af9
Signed-off-by: Vinh Nguyen <vinh.nguyen@hcl.com>
8 years agoBUG 7727 : Local and Connected routes do not get imported 14/53514/3
eupakir [Sat, 25 Feb 2017 14:08:38 +0000 (19:38 +0530)]
BUG 7727 : Local and Connected routes do not get imported

Route Origin for Subnet Routes and Local VM routes were changed from
STATIC to CONNECTED and LOCAL, respectively. Hence, the import/export RT
functionality for VPNs was broken.

Signed-off-by: Vivekanandan Narasimhan <n.vivekanandan@ericsson.com>
Conflicts:
vpnservice/fibmanager/fibmanager-api/src/main/java/org/opendaylight/netvirt/fibmanager/api/FibHelper.java
vpnservice/fibmanager/fibmanager-impl/src/main/java/org/opendaylight/netvirt/fibmanager/FibUtil.java
vpnservice/fibmanager/fibmanager-impl/src/main/java/org/opendaylight/netvirt/fibmanager/VrfEntryListener.java
vpnservice/vpnmanager/vpnmanager-impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnInterfaceManager.java

Change-Id: I04d8326fcb0bddf77934a63c1eb459f23564323b
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
Signed-off-by: Vivekanandan Narasimhan <n.vivekanandan@ericsson.com>
8 years agoFix potential NPEs in ELAN tunnel handling 16/53516/2
Alon Kochba [Wed, 15 Feb 2017 19:16:03 +0000 (21:16 +0200)]
Fix potential NPEs in ELAN tunnel handling

We encountered null ElanInfos in CSIT after deletion
of all the interfaces via REST in BFD Monitoring suite,
this should not prevent other elanDpns from processing.

Conflicts:
vpnservice/elanmanager/elanmanager-impl/src/main/java/org/opendaylight/netvirt/elan/internal/ElanInterfaceManager.java

Change-Id: I465b62cb5133e6aea5326eb4219fc82a70eab70e
Signed-off-by: Alon Kochba <alonko@hpe.com>
8 years agoBug 7418 Run local group creation as async task with key equal to subsequent tasks. 39/52839/3
Konsta Pozdeev [Thu, 16 Feb 2017 11:46:11 +0000 (13:46 +0200)]
Bug 7418 Run local group creation as async task with key equal to subsequent tasks.

Change-Id: I515b3b874b50f8e53a931e1a3ee3a2e30f877f8e
Signed-off-by: Konsta Pozdeev <konsta.pozdeev@hpe.com>
8 years agoBug 7725: AAP with prefix 0.0.0.0/0 not supported in ACL 80/53280/2
Somashekar Byrappa [Thu, 2 Feb 2017 14:21:30 +0000 (19:51 +0530)]
Bug 7725:  AAP with prefix 0.0.0.0/0 not supported in ACL

+ Added a check. In case of 0.0.0.0/0 prefix, program flow with just "ip"
match skipping the ip-prefix (0.0.0.0/0).
+ This method is called to configure flows both in table 40 and 251.

+ Handled below issue:
  - Create VM1 & VM2 with AAP 0.0.0.0/0 and default SG.
  - Create VM3 with default SG without AAP.
  - Delete VM2. Observe that +new+trk flow configured for VM2's 0.0.0.0/0 AAP
    prefix gets deleted (related to remote SG) in 252 table even though VM1 still
    exists.
    Flow: cookie=0x6900000, duration=4737.343s, table=252, n_packets=0,
    n_bytes=0,
    priority=61010,ct_state=+new+trk,ip,metadata=0x10000000000/0x1fffff0000000000
    actions=ct(commit,zone=5000),resubmit(,220)

+ Earlier flow priority was generated/used based on SG rule UUID. The
  above case was not handled with this approach.  So, with this fix now
  every ct_state=+new+trk flow will have a unique flow priority within table.
  Flow priorities are generated based on flow ID.

+ For every switch, two ID pools (one each for ingress and egress) are
  maintained which increases the availability of flow priorities.

Change-Id: I646312e1324267913cbb2865a1a8164b23b40372
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
Signed-off-by: Sam Hague <shague@redhat.com>
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
8 years agoFix for GwMac flow deletion during interface delete 06/53206/2
eceghkl [Mon, 27 Feb 2017 11:07:37 +0000 (16:37 +0530)]
Fix for GwMac flow deletion during interface delete

* Without the fix, the mac address used for deleting the flow
  was obtained after quering interface state again. This
  returned null resulting in gwmac table not getting deleted.
* With the fix, interface state is not queried again. Interface
     state passed during interface state deletion notification is
  used to obtain mac address.

Change-Id: I1c091dc8edb722ab58fdf05f6cba1729a583209e
Signed-off-by: eceghkl <manu.b@ericsson.com>
8 years agoBug 7875: Separated out snmap create and update workflow 54/53254/2
Abhinav Gupta [Thu, 2 Mar 2017 10:01:37 +0000 (15:31 +0530)]
Bug 7875: Separated out snmap create and update workflow

Have made sure that such errors are caught at NeutronVPN
level itself by separating out subnetmap create and update.
Update will not create subnetmap node with partial info, instead will
return if subnetmap node is absent.

Change-Id: I252d0164f123052d7090968325e214289b29daab
Signed-off-by: Abhinav Gupta <abhinav.gupta@ericsson.com>
8 years agoAdding some more debug logs to elan module 11/53311/3
epgoraj [Wed, 15 Mar 2017 05:07:59 +0000 (10:37 +0530)]
Adding some more debug logs to elan module

Change-Id: I6fe5f73c61367f32f59f67b9b49844f24e5cf388
Signed-off-by: epgoraj <p.govinda.rajulu@ericsson.com>
8 years agoBug 7817 & Bug 7838: DHCP ARP flow is not added and irrelevant ARP flows 29/52029/6
karthik [Sat, 18 Feb 2017 01:41:18 +0000 (07:11 +0530)]
Bug 7817 & Bug 7838: DHCP ARP flow is not added and irrelevant ARP flows
                     are installed in compute node.

   * DHCP ARP flow is not added in Compute node
     When VM's are created with multiple networks.
   * VM's are created across networks, irrelevant ARP flows are
     installed in compute node
   * Fix: Compared with segmenationID and write the flows for table 20.
   * This patch contains fix for both the Bug 7817 & Bug 7838.

Change-Id: Iab21d2fe391451dc1f6e9cc70db099105e990871
Signed-off-by: karthik <karthikeyen.p@hcl.com>
8 years agoBug 7888: handle update of floating ip port 17/53217/2
Koby Aizer [Thu, 2 Mar 2017 10:24:55 +0000 (12:24 +0200)]
Bug 7888: handle update of floating ip port

In Ocata, when a floating ip port is created, its deviceId may be
set to "PENDING", and an update will follow with the deviceId later on ([1])

This is causing both an uncaught exception in NeutronPortChangeListener.add()
which assumed deviceId is always a Uuid, and also there is no creation of
FloatingIpIdToPortMapping during update().

[1] https://review.openstack.org/#/c/396013/

Change-Id: Ide44ef016f0a8c576f02dfd28d9a4ee9d492841e
Signed-off-by: Koby Aizer <koby.aizer@hpe.com>
(cherry picked from commit b8d44834604e071f050515b96a64d8e00a09c379)

8 years agoBug 7878: provider interface MACs are installed on remote DPNs 23/53023/2
Koby Aizer [Wed, 1 Mar 2017 10:02:16 +0000 (12:02 +0200)]
Bug 7878: provider interface MACs are installed on remote DPNs

MACs learnt on provider interfaces must not be installed on remote
DPNs.

This change includes 2 fixes:

1. handleInternalTunnelState event initiated installation on remote
DMAC flows for all elans in the remote DPN, without verifying that
this elan is not Flat/Vlan.

2. Protection on setupRemoteDmacFlow to make sure no other code flows
will install remote DMAC flows on MACs learnt on provider interfaces.

Change-Id: I5ae288ed525dc1ae2f5be1bec5215f2e8f01f8c5
Signed-off-by: Koby Aizer <koby.aizer@hpe.com>
8 years agoRectified incorrect help usage displayed for BGP add-neighbor cli command 25/53125/1
Viji J [Fri, 10 Mar 2017 08:48:55 +0000 (14:18 +0530)]
Rectified incorrect help usage displayed for BGP add-neighbor cli command

odl:configure-bgp -op add-neighbor displays incorrect help.

Change-Id: Ic1e7bd747a07de0fdc562eb59d8bc835558900ac
Signed-off-by: Viji J <viji.j@ericsson.com>
8 years agoBug 7787 - missing flows in T21 56/53056/3
Olga Schukin [Mon, 27 Feb 2017 14:19:22 +0000 (16:19 +0200)]
Bug 7787 - missing flows in T21

when VPN interface up before tunnel info is available in operational DS,
it causes missing flows in T21

Fix: always handle the add event inside TunnelInterfaceStateListener -
 even for a tunnel which state is Down

Change-Id: I41c3efbeeb5740788f58ced57a698a73ef70b466
Signed-off-by: Olga Schukin <olga.schukin@hpe.com>
Signed-off-by: Sam Hague <shague@redhat.com>
8 years agoBug 7931: SubnetRoue re-election to be triggered on disconnected nodes 41/53041/2
Vivekanandan Narasimhan [Wed, 8 Mar 2017 09:06:16 +0000 (14:36 +0530)]
Bug 7931:  SubnetRoue re-election to be triggered on disconnected nodes

Subnet Route reelection algorithm is triggered today only when
the anchor ports on the subnet go to DOWN state (or) if such
anchor ports on the subnet are being removed.

However, there are situations where a switch hosting the anchor
port can be disconnected on the openflow control-path and can
continue to remain so indefinitely.

Under such circumstance, new non-neutron IPs become undiscoverable
as the switch hosting the anchor port cannot punt discoverable IP
packets to the controller.

So this fix attempts to always trigger reelection of nodes for
subnetRoute hosting as soon as the current anchor node(or switch)
is detected to be disconnected from the controller.

Change-Id: Idd8be8e2f1940c4840d7d52726ac5187ed33d28f
Signed-off-by: Vivekanandan Narasimhan <n.vivekanandan@ericsson.com>
(cherry picked from commit f9d156dc32aff937425eb586bee3ceefda069091)

8 years agoBug 7876 : After router association to L3vpn, one of the VM ip is not 54/53054/1
ehvkand [Thu, 9 Mar 2017 06:09:11 +0000 (11:39 +0530)]
Bug 7876 : After router association to L3vpn, one of the VM ip is not
removed from router interface to BGPVPN

When a VPN associated to router is deleted and a same VPN is associated
back to same router , there is race condition , where interface is not found
in VpnInterfaceOp and remove event is being ignored.
Hence interface remains in router VPN.

It is also seen that , one of interface from same subnet is swapped and others are
not. Its due to race condition that exist in NeutronVpnManager where
create and update can race with each other. Currently create uses DJC ,
where as update doesn't.

Change-Id: I354c3ce93f965580c735f1153a043e2514d68af7
Signed-off-by: ehvkand <hanamantagoud.v.kandagal@ericsson.com>
8 years agoBug 7885 - CSIT Sporadic failures - 83/52983/2
Aswin Suryanarayanan [Mon, 6 Mar 2017 11:43:44 +0000 (17:13 +0530)]
Bug 7885 - CSIT Sporadic failures -
tempest.scenario.test_port_security_macspoofing_port

On port-security update  bind/ubind service is now called.

Change-Id: I46cfae8b13a3f67647bfc501b3e55faf8c827a37
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
(cherry picked from commit 9a9c988bfa3574126b38003d5a8eb713536809c2)

8 years agoBug 7839: ACL: ACL flows are not deleted from source host during VM 56/52656/3
Shashidhar Raja [Wed, 22 Feb 2017 13:29:52 +0000 (18:59 +0530)]
Bug 7839: ACL: ACL flows are not deleted from source host during VM
migration

    - In the current code, ACL flows are being added in Interface state
      listener and deleted from Interface config listener. As during
      migration, only interface state listener gets triggered, Config
      Interface and Interface state listeners are re-formatted slightly as
      explained below to fix this issue and also to support delete VM
      without any problems.
      Details of changes are as below:
      (a) bind/unbind moved to Config interface listener
      (b) All other ACL flows programming (add/delete) now being done from
      Interface state listener

    - Also, bind/unbind service code is updated to use
      DataStoreJobCoordinator to avoid ConflictingModificationExceptions

Change-Id: I4cf0c0d58eecbceafbed740f0201e128c196f555
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
8 years agoUse the right service name when binding service 81/52881/1
Faseela K [Mon, 6 Mar 2017 06:20:26 +0000 (11:50 +0530)]
Use the right service name when binding service

Making ELAN and ACL bind services with the right service name

Change-Id: I022a0ff4aaff4772870413890ce8a9665af5a309
Signed-off-by: Faseela K <faseela.k@ericsson.com>
(cherry picked from commit 4e608f1f3050c1ccec402a800a04b9c3bf1403b5)

8 years agocorrected the population of BGP Total Prefixes counter 07/52607/3
eamakol [Thu, 2 Mar 2017 05:55:33 +0000 (11:25 +0530)]
corrected the population of BGP Total Prefixes counter

Change-Id: I46106f3e7f96aef8d3c751f66db438b77bcd46d7
Signed-off-by: eamakol <amaranadh.kolla@ericsson.com>
8 years agoBug 7856: Reverse SNAT flows order to minimize race possibility 57/52657/2
Alon Kochba [Tue, 28 Feb 2017 15:52:43 +0000 (17:52 +0200)]
Bug 7856: Reverse SNAT flows order to minimize race possibility

Conflicts:
vpnservice/natservice/natservice-impl/src/main/java/org/opendaylight/netvirt/natservice/internal/ExternalRoutersListener.java
vpnservice/natservice/natservice-impl/src/main/java/org/opendaylight/netvirt/natservice/internal/NaptEventHandler.java
vpnservice/natservice/natservice-impl/src/main/java/org/opendaylight/netvirt/natservice/internal/NaptSwitchHA.java

Change-Id: I145905151348d2fa2670756f24e17c16d6239885
Signed-off-by: Alon Kochba <alonko@hpe.com>
8 years agoBug 7714: VPN Operational Interfaces not getting removed at all. 32/52732/1
ehvkand [Fri, 3 Mar 2017 08:22:13 +0000 (13:52 +0530)]
Bug 7714: VPN Operational Interfaces not getting removed at all.

This can be a potential problem for temporary CSIT failures that happens on
VPNService suite.

The VPNInterface is not getting removed at all permanently from
VpnInterface Op DS. When VM interface has secondary adj like extra route
or invisible ip , the order in which cleanupvpninterface
worker DJC is called not guaranteed.

The regression was caused by review:
https://git.opendaylight.org/gerrit/#/c/51224/
VPNInterfaces not deleted from Oper DS

Change-Id: I1b2a1d139030f707cec93eb5a5e6a690e010e336
Signed-off-by: ehvkand <hanamantagoud.v.kandagal@ericsson.com>
8 years agoBug 7831 : BgpRouter receives unnecessary events 86/52486/2
eupakir [Wed, 1 Mar 2017 10:00:01 +0000 (15:30 +0530)]
Bug 7831 : BgpRouter receives unnecessary events

Suppressed unwanted advertisement of routes, that were being advertised
due to a
breakage in the VPN Engine.
When BGP Client is not configured, route/vrf advertisement used to fail
and throw lot of exception. If BGP Client is not connected, the
process of dispatching routes/vrf to DC-GW via BGP Client should not
happen
at all.

Change-Id: I25b6abe7a67efb4621745933f869f7034eb9cd51
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
8 years agoBug 7881 - Traffic drops when not matching UL SC starting 49/52549/1
Marcos López Samaniego [Tue, 28 Feb 2017 16:23:51 +0000 (17:23 +0100)]
Bug 7881 - Traffic drops when not matching UL SC starting
in a VPNPseudoPort

When programming the L3VPN to SCF pipeline, a new flow is needed in
table 17

Change-Id: I31cf7817eb38b47e5c665c4f0362d0baa9554af4
Signed-off-by: Marcos López Samaniego <marcos.lopez.samaniego@ericsson.com>
8 years agoBug 7861: No ping response from FIP on 1st router when adding 2nd FIP 58/52358/2
karthikeyan [Mon, 27 Feb 2017 16:07:03 +0000 (21:37 +0530)]
Bug 7861: No ping response from FIP on 1st router when adding 2nd FIP

Problem Description:
====================
Table Miss Entry for SNAT/DNAT in FIB Table (table=21->26 flow) is
overriting when multiple router is present instead of creating new entry
for each VPN Instance.

Each router is associated with unique external network and each external
network is associated with unique internet BGP VPN Instance.

Example topology:
router-1/external-network-1/bgp-vpn-1
router-2/external-network-2/bgp-vpn-2

Both router-1 and router-2 are presented on single compute node. In this
scenario router-2 ping traffic only is working as expected. Since table 21
doesn't have the table miss entry for router-1 with bgp-vpn-1 instance.

Solution:
=========

In ExternalNetworkListener while creating table miss entry for SNAT/DNAT
in table 21, added "vpn-id" attribute also in creating flow reference as
same as implemented in the class
SNATDefaultRouteProgrammer.buildDefNATFlowEntity(). After this code change
in table 21 miss entry for SNAT/DNAT is created for each bgp-vpn instance.

Change-Id: Iac909e628f1a4134526e6df0b640149c8d45cd20
Signed-off-by: karthikeyan <karthikeyan.k@altencalsoftlabs.com>
8 years agoBUG:7824 ModifiedNodeDoesNotExistException 23/52323/3
epgoraj [Mon, 27 Feb 2017 07:35:15 +0000 (13:05 +0530)]
BUG:7824 ModifiedNodeDoesNotExistException

Change-Id: I32b64af56b5b7c5ed8d2af9ed3ca5b47b68a153f
Signed-off-by: epgoraj <p.govinda.rajulu@ericsson.com>
8 years agoCleanup errors for networks of unsupported type 76/52276/2
Alon Kochba [Mon, 20 Feb 2017 13:21:20 +0000 (15:21 +0200)]
Cleanup errors for networks of unsupported type

Reword and lower debug level of network configurations
for networks without a provider extension or with an
unsupported type.

Change-Id: I3b58a79b2fb72fe2c56328f79e0962e366a299ff
Signed-off-by: Alon Kochba <alonko@hpe.com>
Signed-off-by: Sam Hague <shague@redhat.com>
8 years agoBug 7775: Using DJC for NAT Interface-state Listeners 37/52137/4
cgowdru [Mon, 13 Feb 2017 12:34:47 +0000 (18:04 +0530)]
Bug 7775: Using DJC for NAT Interface-state Listeners

Description : With mdsalutil is having a THREAD_POOL_SIZE=1, all the
add(), update(), and remove() methods handling the application logic were
on the same thread. This in turn was delaying all the interface-state
listeners.

Changes are done to make use of DataJobCordinator so that all the NAT
application logic get executed by a seperate thread so that the main
thread is freed-up for other listener execution.

Change-Id: I0c7f3f70715b01a2dcb54d251a36a2f9ff21357e
Signed-off-by: cgowdru <chetan.arakere@altencalsoftlabs.com>
8 years agoBug 7824 - ModifiedNodeDoesNotExistException 00/52200/3
Periyasamy Palanisamy [Thu, 23 Feb 2017 06:53:47 +0000 (12:23 +0530)]
Bug 7824 - ModifiedNodeDoesNotExistException

* added potential fix to guard against above exception
while handling elan interface remove/interface state remove
handling

Change-Id: Iad5145eafd9398718171880825f1684189405398
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
8 years agoreleasing dcn thread once tunnel interface state dcn delivered 90/51890/4
Periyasamy Palanisamy [Mon, 13 Feb 2017 10:39:38 +0000 (16:09 +0530)]
releasing dcn thread once tunnel interface state dcn delivered

* This change is about releasing dataTreeChangeHandlerExecutor's thread
immediately after DCN is delivered to service module. This allows to
improve DataTreeChangeListener notification time when there are multiple
listerners listening to same data tree path.
* For ELAN, DJC is used to run tunnel interface state DCN related tasks in async
way using ElanUtils#getElanInterfaceJobKey

Change-Id: If3128e623ac3eae81fbec17320bf54d425b7f6f5
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
8 years agoBug 7780 : NAT RPC's for getting SNAT/DNAT translation information. 93/52093/6
cgowdru [Mon, 13 Feb 2017 08:07:38 +0000 (13:37 +0530)]
Bug 7780 : NAT RPC's for getting SNAT/DNAT translation information.

Description : With the Current DS structure, it's is bit difficult to
identify information about what is the current DNAT/SNAT configuration
done fo the given router-uuid/vpn-uuid.

It would be good if we have a RPC's which can provide a information as
below.

input- router-uuid/vpn-uuid

SNAT output - router-name, internal-ip/port, external-ip/port,protocol
DNAT output - router-name,internal-ip,floating-ip

Change-Id: I00b6576d2a752b53e94ad28c611a06794c65456c
Signed-off-by: cgowdru <chetan.arakere@altencalsoftlabs.com>
8 years agoBug 7815: Using DJC for VpnManager Interface-state Listeners 10/52210/3
ehvkand [Thu, 23 Feb 2017 13:33:35 +0000 (19:03 +0530)]
Bug 7815: Using DJC for VpnManager Interface-state Listeners

With mdsalutil is having a THREAD_POOL_SIZE=1, all the add(), update(), and
remove() methods handling the application logic were on the same thread.
This in turn was delaying all the interface-state listeners. Changes are
done to make use of DataJobCordinator so that all the VpnManager
application logic get executed by a seperate thread so that the main
thread is freed-up for other listener execution.

Change-Id: I926e0742fdc7955450c9423ce5026f9177ce21bb
Signed-off-by: ehvkand <hanamantagoud.v.kandagal@ericsson.com>
8 years agoBug 7843 - Missing buckets in ELAN BC group installation during OVS restart 70/52270/1
Tali [Thu, 23 Feb 2017 13:35:25 +0000 (15:35 +0200)]
Bug 7843 - Missing buckets in ELAN BC group installation during OVS restart

L2 pipeline can contain malformed flows/groups if OVS restart occurs in parallel
due to oper DS temp delete during restart
Possible solution would be to check for config DS inventory node instead of oper DS
so flows would be restored with correct content after the OVS is up again

Change-Id: I5aee6c2af85bca1beb98dab52bfa9181975192b1
Signed-off-by: Tali <tali.ben-meir@hpe.com>
8 years agoBug 7786 Delete and re add of access port handling 07/51807/5
Akash [Mon, 13 Feb 2017 15:39:44 +0000 (21:09 +0530)]
Bug 7786 Delete and re add of access port handling

After deleting access port in l2gw device and upon readding , vlan
bindings were missing .
Fix is to resync upon such case from config topology.

Change-Id: I993616f6ea90312af2ae5830e444c1918f8b48bb
Signed-off-by: Akash <a.k.sahu@ericsson.com>
8 years agoBug 7772 - Service Chaining is not being applied to VMs in the L3VPN 81/51681/8
Miguel Perez [Mon, 16 Jan 2017 17:30:16 +0000 (18:30 +0100)]
Bug 7772 - Service Chaining is not being applied to VMs in the L3VPN

 + Problem: Ping from outside DC-GW to a VM located inside DC-GW
   works well in the Uplink, that is, packets going from outside
   DC-GW towards the VM are hijacked by SCF Pipeline and delivered
   to VM. However, when VM responds (Downlink), the packets are sent
   to DC-GW right away via L3VPN pipeline. Service Chaining is not
   applied for the return path.

 + Solution: try to divert to SCF Pipeline the packets that come from
   the VM too, not only the packets coming from the external Tunnel
   port.

 + How: by adding a listener on VpnInterface on CONFIG DS.
   When a VpnInterface is added, the listener checks if its VPN is
   involved in a ServiceChain or not. If so, the interface is bound
   to SCF too.

Change-Id: Id1051bc8ec180589583a76524c0b2d456ba7b85a
Signed-off-by: Marcos López Samaniego <marcos.lopez.samaniego@ericsson.com>
8 years agoAdding debug statements to track caching of Operational Vpn Instances 22/52122/2
eupakir [Tue, 21 Feb 2017 15:35:21 +0000 (21:05 +0530)]
Adding debug statements to track caching of Operational Vpn Instances

Conflicts:
vpnservice/vpnmanager/vpnmanager-impl/src/main/java/org/opendaylight/netvirt/vpnmanager/cache/listeners/VpnOpInstanceCacheManager.java

Change-Id: I0bb17dec5714e8f68085bf1b70e2b2fa1f2f16ae
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
8 years agoFix priority in IntervpnLink flows installed in LFIB 91/51991/3
Miguel Perez [Wed, 15 Feb 2017 14:08:55 +0000 (15:08 +0100)]
Fix priority in IntervpnLink flows installed in LFIB

 + InterVpnLink flows installed in LFIB must have higher priority than
   regular ones (which is typically 1 or 10)

Change-Id: Ifb6a6e8d91f83b65ffda356cd16ad878a1ae11ee
Signed-off-by: Miguel Perez <francisco.miguel.perez@ericsson.com>
8 years agoadding lport tag for temporary mac learning 69/52069/6
epgoraj [Mon, 20 Feb 2017 12:45:53 +0000 (18:15 +0530)]
adding lport tag for temporary mac learning

* loading lport tag into NxmNxReg1 while binding elan service
to the interface.
* adding NxmNxReg1 match for table 49 using relearn action

Change-Id: I2914c08157bf33fdb033b7656f1692b6be3ea690
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
Signed-off-by: epgoraj <p.govinda.rajulu@ericsson.com>
8 years agoFix several NPEs showing up in CSIT 84/52084/2
Alon Kochba [Sun, 12 Feb 2017 16:29:05 +0000 (18:29 +0200)]
Fix several NPEs showing up in CSIT

1. ElanUtils - an ELAN instance can have no segments
2. TEPChangeListener - TEP could be missing in interfaces-state
3. VpnInterfaceManager - gateway IP/MAC could be missing when creating
ARP responder flows.
4. BgpConfigurationManager - NextHop in list could be null
5. TransportZoneNoticationUtil - not all interfaces have a neutron port

Change-Id: Ibbf6e5834cd01389e29e36736073927cdd3dbb1a
Signed-off-by: Alon Kochba <alonko@hpe.com>
Signed-off-by: Sam Hague <shague@redhat.com>
8 years agoFix BFD regression 73/52073/2
Tali [Wed, 15 Feb 2017 16:26:15 +0000 (18:26 +0200)]
Fix BFD regression

When tunnel and elan-interface goes up in parallel, there is a race in writing
DMAC flows. The result could be DMAC flow with drop action for the affected interface

Change-Id: I080e222025d59f0b482cd6c07563c168646afc76
Signed-off-by: Tali <tali.ben-meir@hpe.com>
(cherry picked from commit 19c5da8fc44c9435dcd597c701eaccdba9e1b595)

8 years agoBUG7748: Subnet-op-data empty after cluster reboot 38/51838/3
Suraj Ranjan [Tue, 14 Feb 2017 08:36:57 +0000 (14:06 +0530)]
BUG7748: Subnet-op-data empty after cluster reboot

SubnetAddToVpn notification is fired from add() of SubnetMapListener
also instead of firing from update() only.The reason for doing this is
after reboot this event comes in subnetmap add().

Change-Id: I247753ba1a52e896a4bd2ec7f96c3b5efae35055
Signed-off-by: Suraj Ranjan <suraj.ranjan@ericsson.com>
8 years agoBug 7790 - Attempting to install RNH on local DPN for FIB with custom instructions 78/51978/3
Tali [Thu, 16 Feb 2017 13:27:24 +0000 (15:27 +0200)]
Bug 7790 - Attempting to install RNH on local DPN for FIB with custom instructions

On VxLAN network there is no severe side affect other than trashing the log
For VLAN/flat networks this is a major issue since VrfEntryListener is not able to
find any local DPN hence all FIB entries are considered RNH and the actual local
FIB entry created using FibRpcService.createFibEntry() will be overridden by the
faulty RNH on the local DPN.

Change-Id: I49f6660608337fa9baf178179d589d9c6980964e
Signed-off-by: Tali <tali.ben-meir@hpe.com>
8 years agoUse Objects equals instead of == where necessary 45/51945/5
Alon Kochba [Mon, 6 Feb 2017 19:24:16 +0000 (21:24 +0200)]
Use Objects equals instead of == where necessary

This might actually fix bugs and change behavior,
there were places where Java objects were compared
using == instead of equals(), this patch corrects
those cases.

Conflicts:
    vpnservice/cloud-servicechain/cloud-servicechain-impl/src/main/java/org/opendaylight/netvirt/cloudservicechain/listeners/VrfListener.java
    vpnservice/cloud-servicechain/cloud-servicechain-impl/src/test/java/org/opendaylight/netvirt/cloudservicechain/matchers/FlowMatcher.java
    vpnservice/neutronvpn/neutronvpn-api/src/main/java/org/opendaylight/netvirt/neutronvpn/api/utils/NeutronUtils.java
    vpnservice/neutronvpn/neutronvpn-impl/src/main/java/org/opendaylight/netvirt/neutronvpn/NeutronvpnManager.java
    vpnservice/vpnmanager/vpnmanager-impl/src/main/java/org/opendaylight/netvirt/vpnmanager/ArpReplyOrRequest.java
    vpnservice/vpnmanager/vpnmanager-impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnSubnetRouteHandler.java

Change-Id: I6996e168966fb660d62cca3e4c81635a6c1f6b06
Signed-off-by: Alon Kochba <alonko@hpe.com>
8 years agoUpdate netvirt guide - correct DB DROP procedure 10/52010/2
Alon Kochba [Wed, 15 Feb 2017 13:28:30 +0000 (15:28 +0200)]
Update netvirt guide - correct DB DROP procedure

Change-Id: I99d19c118d05ade5a9c77f6a98f75abb1b8c7ddc
Signed-off-by: Alon Kochba <alonko@hpe.com>
8 years agobug 7599 added l2gw validate cli 56/51556/2
K.V Suneelu Verma [Sun, 5 Feb 2017 09:14:56 +0000 (14:44 +0530)]
bug 7599 added l2gw validate cli

Added a helper cli to validate various config and operational
data models.
Checks if the config and operational datastore differ
Checks if the ha parent node and child nodes differ
Checks if the logical switches/ mcast macs and vlan bindings
are created for the configured l2gw connection

Change-Id: I96924a520d30985b98508afdaccbe379ef54d76e
Signed-off-by: K.V Suneelu Verma <k.v.suneelu.verma@ericsson.com>
8 years agobug 6589 l2gw cluster reboot fixes 55/51555/2
K.V Suneelu Verma [Tue, 3 Jan 2017 06:43:10 +0000 (12:13 +0530)]
bug 6589 l2gw cluster reboot fixes

registerd the group listener
created the l2gw cache upfront
fixed npe in terminationPoint command

Change-Id: I5e4e4d68e650a2c68d3c7b4bf464dc29815e0d48
Signed-off-by: K.V Suneelu Verma <k.v.suneelu.verma@ericsson.com>
8 years agoBug 7606: Fix for missed tunnel flows, after VM live migration 96/51796/6
VinothB [Mon, 13 Feb 2017 04:22:04 +0000 (09:52 +0530)]
Bug 7606: Fix for missed tunnel flows, after VM live migration

   * Skip deleting the flows in table 110 and table 20 when processing an
    interface deletion event from OVSDB in the case that the interface
    deletion is due to VM migration.
   * Remove the Port Name from flowName so that, the same entry gets
    updated during the update notification processing while live migration.

Change-Id: I2b917e50e07af4ed840d811a9c3f0a131281bd12
Signed-off-by: VinothB <vinothb@hcl.com>
8 years agoBug 7773: Objects should be compared with "equals()". 56/51056/6
Hideyuki Tai [Thu, 26 Jan 2017 01:56:17 +0000 (01:56 +0000)]
Bug 7773: Objects should be compared with "equals()".

Additional changes:
 * Removed unnecessary repetitive calls.

Change-Id: I607ce073ee9ec4289c80dccd96a4b5222e4d9772
Signed-off-by: Hideyuki Tai <Hideyuki.Tai@necam.com>
8 years agoImprove log messages. 37/51037/3
Hideyuki Tai [Wed, 25 Jan 2017 21:43:00 +0000 (21:43 +0000)]
Improve log messages.

* Correct wrong messages.
* Change the log level of some messages into the appropriate level.

Change-Id: I3e238611ebc9c9fc42aa800caa2a44621880c9aa
Signed-off-by: Hideyuki Tai <Hideyuki.Tai@necam.com>
8 years agoRevert "BUG7748: Subnet-op-data empty after cluster reboot" 48/51648/2
Sam Hague [Thu, 9 Feb 2017 19:27:51 +0000 (19:27 +0000)]
Revert "BUG7748: Subnet-op-data empty after cluster reboot"

This reverts commit 079b071c122cc3918b419d0ac62e504a3d89030a.

Change-Id: I0bce2abcb79aa43a85b12d260de525df6466f78a
Author: Sam Hague <shague@redhat.com>
Signed-off-by: Sam Hague <shague@redhat.com>
8 years agoBug 7392: L2 Forwarding Table=110 Flows Missing 94/51394/7
hari.pr [Fri, 3 Feb 2017 18:07:56 +0000 (23:37 +0530)]
Bug 7392: L2 Forwarding Table=110 Flows Missing

 * Problem:  While creation of very first subnet or Vm in CSIT environment,
              respective 110 flow is missing in openstack nodes.
 * Solution: Installed missing table#110 flows as part of Vxlan interface request.

Change-Id: Ie7eb35b50aaaafa79fd8ed0f0893ab37156f431e
Signed-off-by: hari.pr <hari.pr@hcl.com>
8 years agoBUG 7729: Remove redundant tunnel drop flow in table 110 23/51423/3
Vinh Nguyen [Sat, 4 Feb 2017 01:30:47 +0000 (17:30 -0800)]
BUG 7729: Remove redundant tunnel drop flow in table 110

- Remove methods: L2ForwardingService::programLocalTableMiss
  and L2ForwardingService::programTunnelMiss. Both methods
  generate the same tunnel drop flows in table 110.
  The drop flows for individual tunnels are not needed
  since there is a default drop flow in the same table.

- Remove the method L2ForwardingService::programVlanFloodOut
  which is not used.

Change-Id: I0fb826094b6c03e58fb89c95600e7b84bc2c774f
Signed-off-by: Vinh Nguyen <vinh.nguyen@hcl.com>
8 years agoBUG7748: Subnet-op-data empty after cluster reboot 06/51506/3
Suraj Ranjan [Mon, 6 Feb 2017 16:06:37 +0000 (21:36 +0530)]
BUG7748: Subnet-op-data empty after cluster reboot

SubnetAddToVpn notification is fired from add() of SubnetMapListener
also instead of firing from update() only.The reason for doing this is
after reboot this event comes in subnetmap add().

Change-Id: I766e3836cbe8b0eafbf5fbb52791ca96eb6ccfa9
Signed-off-by: Suraj Ranjan <suraj.ranjan@ericsson.com>
8 years agoBug 7680: Fix Nexthop when advertising to DCGW 17/51617/1
Miguel Perez [Wed, 8 Feb 2017 17:24:13 +0000 (18:24 +0100)]
Bug 7680: Fix Nexthop when advertising to DCGW

 + for static routes whose nexthop is a VM, the leaked route to the other
   VPN was being advertised to DCGW with the DPN where VM is located as
   the nexthop of the route. However, the nexthop must be the DPN where
   the InterVpnLink has been placed.

Change-Id: I1097e9c992c66053f499807fd411334a7113b509
Signed-off-by: Miguel Perez <francisco.miguel.perez@ericsson.com>
8 years agoBug 7680: leaked routes not advertised to DC-GW 48/51548/4
Miguel Perez [Tue, 24 Jan 2017 17:01:29 +0000 (18:01 +0100)]
Bug 7680: leaked routes not advertised to DC-GW

 + It's been found that the routes that are leaked to DC-GW
   at InterVpnLink creation time (well, at InterVpnLink added
   callback) are correctly advertised to DC-GW. However, the
   routes that are leaked after the InterVpnLink has been
   created are not being advertised to DC-GW.

 + These second type of leaked routes are handled on fibmanager,
   but fibmanager does not have access to BgpManager. So the
   solution consists in moving part of the logic from fibmanager
   to vpnmanager where the BgpManager is accessible.

 + InterVpnLinkService class, which was just an internal class in
   vpnmanager-impl, is renamed to InterVpnLinkLocator whose only
   responsibility is to search for the most suitable DPNs to
   place new InterVpnLinks. The name change is to avoid confusion
   with IVpnLinkServiceImpl which is the implementation of the
   public interface 'IVpnLinkServce'.

 + Besides the renaming of InterVpnLinkService, most of its code
   is moved to IVpnLinkServiceImpl, and that's why this change
   may llok big.

 + Note: there is a <wip> [1] for taking the route leaking out
   of the fibmanager completely.

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

Change-Id: I1a7311345307716ef223c707b22c6ecec66d97a2
Signed-off-by: Miguel Perez <francisco.miguel.perez@ericsson.com>
8 years agoBug 7372 - Supress error of NAPT switch selection failure before router-dpn association 76/51476/2
Tali [Thu, 15 Dec 2016 09:15:07 +0000 (11:15 +0200)]
Bug 7372 - Supress error of NAPT switch selection failure before router-dpn association

NAPT switch selection will take place once the router-dpn association is made
All missing NAPT/non-NAPT flows will be recovered as the result of selection

This review fixes only the log levels.
There can still be some missing NAPT flows in this scenario
The resolution for this is still WIP and covered by
https://bugs.opendaylight.org/show_bug.cgi?id=6866

Change-Id: Ib655c1fbf1c43f29a75223a0b48d410d47ef75d9
Signed-off-by: Tali <tali.ben-meir@hpe.com>
8 years agoSetup SMAC on routed packets destined to virtual endpoints 09/51109/6
karthik.prasad [Thu, 12 Jan 2017 15:27:25 +0000 (20:57 +0530)]
Setup SMAC on routed packets destined to virtual endpoints

All L3 Routed packets destined to virtual endpoints in the datacenter
managed by ODL do not carry a proper source-mac address in such frames
put out to virtual endpoints. With the fix all the packets destined to
virtual endpoints shall have gateway mac as source mac. If gateway mac
is not recoverable for the subnet on which the virtual endpoint resides,
then the connected mac address of that virtual endpoint will be used as
the source mac address.  Here the connected mac address represents the
mac-address on the tapxxx (or) the vhuxxx port on OVS Datapath for that
virtual endpoint.

VrfEntry yang model is used to represent the gateway source mac.

Sample Group Entry:
group_id=150001,type=all,bucket=actions=set_field:fa:16:3e:a1:4b:61->eth_src,set_field:fa:16:3e:21:b8:d3->eth_dst,load:0x300->NXM_NX_REG6[],resubmit(,220)

Spec Reference link:
https://git.opendaylight.org/gerrit/#/c/49807

Conflicts:
vpnservice/fibmanager/fibmanager-impl/src/main/java/org/opendaylight/netvirt/fibmanager/NexthopManager.java
vpnservice/vpnmanager/vpnmanager-impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnInterfaceManager.java
vpnservice/vpnmanager/vpnmanager-impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnUtil.java

Change-Id: I2e75215fd75f051135d702ab63cb792b6cf4cb55
Signed-off-by: karthik.prasad <karthik.p@altencalsoftlabs.com>
Signed-off-by: Vivekanandan Narasimhan <n.vivekanandan@ericsson.com>
Signed-off-by: Achuth Maniyedath <achuth.m@altencalsoftlabs.com>
8 years agoBug 7445: Improve the performance on bulk create. 16/50616/16
karthikeyen.p [Wed, 18 Jan 2017 04:10:17 +0000 (09:40 +0530)]
Bug 7445: Improve the performance on bulk create.

    * Reduced read calls when SG associated with the VMs.
    * We have used cache mechanism to store neutron port information
      that was read from DS.

Change-Id: I3b243ddf3656e48392593c6fc1086713d1fd1af3
Signed-off-by: karthikeyen.p <karthikeyen.p@hcl.com>
8 years agoBug 7733: NeutronVPN: Error out if VxLAN/VLAN network configured without seg-id 87/51387/4
Abhinav Gupta [Thu, 12 Jan 2017 11:10:02 +0000 (16:40 +0530)]
Bug 7733: NeutronVPN: Error out if VxLAN/VLAN network configured without seg-id

This adds an error log based on the presence of segmentation-id when VxLAN
or VLAN based neutron networks are configured via Neutron.

Additionally, some cleanup done:
1. Moved some impl specific utils to NeutronVpnUtils
2. Moved constants to NeutronConstants
3. Renamed SubnetMapListener class to SubnetMapChangeListener
4. Removed  unused xml dependency from QosListener

Change-Id: I2d22773e4e7bdfa927c01d679542fa36146e625a
Signed-off-by: Abhinav Gupta <abhinav.gupta@ericsson.com>
8 years agoBug 7714 - Vpn Interface not deleted from oper DS 56/51456/1
Olga Schukin [Tue, 31 Jan 2017 10:35:55 +0000 (12:35 +0200)]
Bug 7714 - Vpn Interface not deleted from oper DS

sometimes Vpn Interface not deleted from operational/l3vpn:vpn-interfaces model,
if there is more than one adjacency to this vpn interface.

Change-Id: I45e4ca20db6c5aa9f5c280fea8726a5ed8aa654b
Signed-off-by: Olga Schukin <olga.schukin@hpe.com>
8 years agoBug 7720: create/delete VPN CLI handling addition/removal of subnets 76/51376/2
Abhinav Gupta [Wed, 1 Feb 2017 13:09:40 +0000 (18:39 +0530)]
Bug 7720: create/delete VPN CLI handling addition/removal of subnets

Following changes have been done as part of the bug fix:

1. Addition of subnets to VPN done via associateNetworks RPC
2. Deletion of subnets from VPN done via dissociateNetworks RPC
3. (1) is done only if createVPN succeeds
4. Deletion of VPN is done only if (2) succeeds

Change-Id: I21d25afa6b3ba56dae56abe2536afcfe5f0476b4
Signed-off-by: Abhinav Gupta <abhinav.gupta@ericsson.com>
8 years agoBug 7601: Cleanup Elan instances when a network is deleted 52/51252/2
Sridhar Gaddam [Thu, 19 Jan 2017 14:45:14 +0000 (20:15 +0530)]
Bug 7601: Cleanup Elan instances when a network is deleted

The following patch in Neutron[1] modifies the Network delete sequence.
Prior to a network delete event, we now see an update event that removes
the networkType. So, in delete event, when we try to check for the
networkType, it would be empty and there is an exception. Because of this,
elanInstances are not getting deleted. In this patch, we avoid the check
for networkType since the network itself would not be created in the first
place if its not a supported networkType.

[1] https://review.openstack.org/#/c/317358/

Change-Id: I349a51f4df666ef2c2912ee552f159b6af16de76
Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
8 years agoBUG 7717 Fix OOM when defining large number of networks 78/51278/2
Vinh Nguyen [Wed, 1 Feb 2017 01:06:50 +0000 (17:06 -0800)]
BUG 7717 Fix OOM when defining large number of networks

Use NodeId instead of Node as key for the cache
ProviderNetworkManagerImpl::nodeToProviderMapping
The size bridge Node object is huge when there are
large number of network/subnets on the bridge.

Change-Id: I6956318477dfa524ce20680d12bba3c7818540ec
Signed-off-by: Vinh Nguyen <vinh.nguyen@hcl.com>
8 years agoBUG 7488 Add option to disable auto bridge creation 67/51267/1
Vishal Thapar [Mon, 30 Jan 2017 07:08:12 +0000 (12:38 +0530)]
BUG 7488 Add option to disable auto bridge creation

This adds a new param to elan-config, auto-create-bridge that defaults to
true. When false, netvirt will neither try to create br-int if it doesn't
exist, nor add any configuration if it exists. This is to be used in
scenarios where br-int is already created and configured.

Change-Id: I39c2770a0c0351d9e1b1fecd2642f473650e6c52
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
(cherry picked from commit 1dd6d15f82b1f8f4b9897cca5c8ca71f6a49f898)

8 years agoBUG 7591: Allow configuration of inactivity_probe and max_backoff for OVS 12/51212/2
Vishal Thapar [Thu, 19 Jan 2017 13:21:11 +0000 (18:51 +0530)]
BUG 7591: Allow configuration of inactivity_probe and max_backoff for OVS

Change-Id: I7881934df38c32cd40e156944c3ee46804d5a4e4
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
8 years agoBug 7667: SNAT table 46&44 are not getting programmed when private BGPVPN 11/51111/4
karthikeyan [Wed, 25 Jan 2017 08:05:05 +0000 (13:35 +0530)]
Bug 7667: SNAT table 46&44 are not getting programmed when private BGPVPN

Problem Description:
=====================
SNAT: Table 46(OUTBOUND_NAPT) and table 44 (INBOUND_NAPT) are not getting
programmed (SNAT Forward Traffic and SNAT Reverse Traffic) with NAT
translation when router is
associated with Private/Internal BGP-VPN.Due to this issue, SNAT traffic
is getting failed when interval bgp-vpn is configured.

Root Cause of the Problem:
==========================
As part of bug (Bug 7478) fix SNAT traffic is used to send router-gw mac
address instead of VM mac. With this code changes router gw-mac was
getting from external-router Yang Model using router name as key.

When private/internal bgp-vpn is configured router-id (Internal Private
VPN ID) should be replaced with created private/internal bgp-vpn id. With
this approach when querying external-router Yang model for getting
router-gw mac address using new router-id (bgp-vpn id) will not match with
router-name.

Solution:
===========
When querying external-router yang model for getting router-gw mac address
it should use old router-id instead of bgp-vpn id. For doing this change
in NAPTEventHandler re-aligned the router-gw mac address code to
appropriate place to be working as expected.

Change-Id: Ieefd799d6b2349464bfb737e3fcc8101036c3619
Signed-off-by: karthikeyan <karthikeyan.k@altencalsoftlabs.com>
8 years agoBUG 7489: Add startup config file for elanmanager-config 07/51207/3
Vishal Thapar [Sun, 22 Jan 2017 09:30:08 +0000 (15:00 +0530)]
BUG 7489: Add startup config file for elanmanager-config

This implements issue 2 mentioned in BUG 7489 by adding a new
configuration file in which user can specify default values for
elan-config at startup.

Note: Update-Strategy is set to None which means any runtime changes to
config will not be reflect till next restart

Path: etc/opendaylight/datastore/initial/config/
Config file name: netvirt-elanmanager-config.xml

Change-Id: I7e3c34166ffd3d8c72f860e1ea34a2c3cc79c309
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
8 years agoBug 7700: create-l3vpn (REST/CLI) should not allow another VPN to use the same VPNID 74/51174/2
Abhinav Gupta [Mon, 30 Jan 2017 07:51:10 +0000 (13:21 +0530)]
Bug 7700: create-l3vpn (REST/CLI) should not allow another VPN to use the same VPNID

Change-Id: I4481db51b17e92b2df7afab18b41bcb4e1a23df0
Signed-off-by: Abhinav Gupta <abhinav.gupta@ericsson.com>
8 years agoFix ElanStatusMonitorJMX failing upon bundle reinitialization. 81/51181/2
Yakir Dorani [Sun, 22 Jan 2017 17:15:09 +0000 (19:15 +0200)]
Fix ElanStatusMonitorJMX failing upon bundle reinitialization.

Change-Id: I9e04e3ee1b9edc6000439e18b35c729f9ec0f92b
Signed-off-by: Yakir Dorani <yakir.dorani@hpe.com>
(cherry picked from commit 7f1f03e93f02fddd3002066d87b52ad782566c53)

8 years agoSNAT tests failures 62/51162/2
Olga Schukin [Thu, 26 Jan 2017 06:45:16 +0000 (08:45 +0200)]
SNAT tests failures

The rule with empty action list was installed to T47

Change-Id: I8fb81cafb2a7bfd392ce24b73dedf14ab29608bb
Signed-off-by: Olga Schukin <olga.schukin@hpe.com>
8 years agoBUG7308: fix leaf to leaf traffic 63/51163/1
David Goldberg [Thu, 19 Jan 2017 16:12:38 +0000 (18:12 +0200)]
BUG7308: fix leaf to leaf traffic

Change-Id: Iabae4f9fb7a2665f41f705ad0a6516a2d96ec77b
Signed-off-by: David Goldberg <gdavid@hpe.com>
(cherry picked from commit adb975a4ca8acc029e6db3d8f7f558669f375748)

8 years agoBUG-7461 58/51058/2
Bertrand [Thu, 26 Jan 2017 03:19:00 +0000 (19:19 -0800)]
BUG-7461

Align Legacy Netvirt with New Netvirt's design of not
removing integration bridge from the config DS.

Change-Id: I9f5da8344747f854828cddedd8c91f633b7b666f
Signed-off-by: Bertrand <bertrand.low@hcl.com>
8 years agoBug 7669: Add multi-provider network support to NetVirt for L2 Gateway. 66/50966/3
Victor Pickard [Tue, 24 Jan 2017 12:10:09 +0000 (07:10 -0500)]
Bug 7669: Add multi-provider network support to NetVirt for L2 Gateway.

Multi-provider network support is needed to be able to support
connecting VLAN based networks to VXLAN based networks,
using L2GW/HWVTEP.

Slides describing the network, and use cases, can be
found here:
https://docs.google.com/presentation/d/10Mg3OLkqXiEOcY0psB4aI-TaHRvOX0NWAOlfkmtN6RY/edit#slide=id.g1b8ae7086a_0_402

Testing
-------
Setup and successfully tested use cases 1-3, as described in
slides above.

Note: There is a corresponding Nova bug that must be fixed
for this to work. Basically, Nova needs to add support
for multi-provider networks. This work is in progress.

Change-Id: Iba4e52210e8c27e0ec35fe68b1fba3970b3a66c8
Signed-off-by: Victor Pickard <vpickard@redhat.com>
8 years agoLower debug level when truncating provider port name 59/51159/1
Alon Kochba [Wed, 25 Jan 2017 16:47:22 +0000 (18:47 +0200)]
Lower debug level when truncating provider port name

This print shows up a lot in the log, as it is
called on multiple events, whenever the configured
provider port name is longer than 15 chars.
Lowering debug level as it is mostly an internal
translation.

Change-Id: Ic317c96c66cd876e2fd3628b4985ea0abb6d5152
Signed-off-by: Alon Kochba <alonko@hpe.com>
8 years ago[BUG 7543] Replace the request function used by restangular 30/51030/2
Maxime Millette-Coulombe [Thu, 19 Jan 2017 21:01:41 +0000 (16:01 -0500)]
[BUG 7543] Replace the request function used by restangular

Restangular as two methods to fetch data: get and getList.
Those two methods was doing the same things, but it seems
that getList now expect a List of JSON and not an object
who caused the application to crash.

Change-Id: I4aa51860cd03f3f6a04d2322518c7c9c7a1b3092
Signed-off-by: Maxime Millette-Coulombe <mmcoulombe@inocybe.com>
(cherry picked from commit 55893ff64b7c3fe7e7e50410a04ab57bdf1855b3)