NETVIRT 1029:Route label mismatch for Subnet route 82/65882/2
authorLoshmitha <loshmitha@ericsson.com>
Fri, 24 Nov 2017 08:35:49 +0000 (14:05 +0530)
committerSam Hague <shague@redhat.com>
Tue, 19 Dec 2017 00:00:44 +0000 (00:00 +0000)
For an update of network,BGP was deleting the old network,sleeping for 5
secs and adding a new network to QBGP.But if the same network update
came in this 5 secs,it was creating issues.So removing 5 sec delay after
checking with QBGP guys

Change-Id: I9a4cb8f096b608e84e377eeb301d3bd52519b175
Signed-off-by: Loshmitha <loshmitha@ericsson.com>
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/BgpConfigurationManager.java

index d878989f12f58335f11ef1c6423b539c96733313..d9666288cbadfe313d61569400a2bc79bf8178ae 100755 (executable)
@@ -26,7 +26,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Objects;
 import java.util.Timer;
-import java.util.TimerTask;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CountDownLatch;
@@ -1166,16 +1165,12 @@ public class BgpConfigurationManager {
                         oldval.getRd(), oldval.getPrefixLen(), oldval.getLabel(), oldval.getNexthop());
                 return;
             }
-            LOG.debug("received update networks config val {}", newval.getPrefixLen());
+            LOG.debug("update networks old val RD: {}, Prefix: {}, Label: {}, NH: {} "
+                            + "new val RD: {}, Prefix: {}, Label: {}, NH: {}",
+                    oldval.getRd(), oldval.getPrefixLen(), oldval.getLabel(), oldval.getNexthop(),
+                    newval.getRd(), newval.getPrefixLen(), newval.getLabel(), newval.getNexthop());
             remove(iid, oldval);
-            timer.schedule(new TimerTask() {
-                @Override
-                public void run() {
-                    if (newval != null) {
-                        add(iid, newval);
-                    }
-                }
-            }, Integer.getInteger("bgp.nexthop.update.delay.in.secs", 5) * 1000L);
+            add(iid, newval);
         }
     }