Tep delete changes for extra-route reachability 38/76238/2
authoreswanit <swati.udhavrao.niture@ericsson.com>
Wed, 19 Sep 2018 08:17:09 +0000 (13:47 +0530)
committerSam Hague <shague@redhat.com>
Tue, 2 Oct 2018 01:16:33 +0000 (01:16 +0000)
NETVIRT-1422: Extraroute not reachable from DC-GW
to compute when tep is deleted on another compute

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

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

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

Change-Id: I3cc496746b620a6b695f6244dfaa3fc2fec4b808
Signed-off-by: eswanit <swati.udhavrao.niture@ericsson.com>
fibmanager/impl/src/main/java/org/opendaylight/netvirt/fibmanager/NexthopManager.java

index fa7b1dc87f9be634441032fd766aca6d0a7cd967..75798c86acb3c94c045e443ce111030d7c815b5d 100644 (file)
@@ -866,10 +866,9 @@ public class NexthopManager implements AutoCloseable {
                         remoteGroupEntity.getGroupId(), localGroupEntity.getGroupId(),
                         remoteGroupEntity.getGroupType());
             }
-            // Delete local group(if exists) if there is no local info or no remote info.
+            // Delete local group(if exists) if there is no local info.
             // Local group has to be deleted if all VMs in a compute is deleted.
-            // Local group(=remote group) is not required if all next hops are present in the same compute.
-            if (localBucketInfo.isEmpty() ^ remoteBucketInfo.isEmpty()) {
+            if (localBucketInfo.isEmpty()) {
                 LOG.debug("Deleting local group {} since no local nhs present for "
                         + "prefix {}", localGroupEntity.getGroupId(), destPrefix);
                 mdsalApiManager.syncRemoveGroup(localGroupEntity);