Bug 7234 : Placeholder for BGP minor fixes 62/48662/4
authorVyshakh Krishnan CH <vyshakh.krishnan.c.h@ericsson.com>
Mon, 28 Nov 2016 08:21:04 +0000 (13:51 +0530)
committerSam Hague <shague@redhat.com>
Mon, 28 Nov 2016 20:32:47 +0000 (20:32 +0000)
Issue 1:
Modified BGP-Util MD-SAL read, not to supress the exception.
As this exception is used for BGP configuration retry mechanism.

Issue 2:
BGP stale path timer will be shown as default.

Issue 3:
BGP replay mechanism: Publishes internal VRF's & prefixes before
neighborship configuration.
6windQuagga EOR(End of Rib) marker: EOR Marker sent immediately after the
neighborship establishment.
So in case of BGP-restart scenario, 6windQuagga sends EOR immediately
after the session establishment,
in this scenario, the prefixes which are published earlier (before
restart) will be purged till CSC
replays them. Due to this there will be impact in datapath between
local-VM's to external DC-Gwy.

Change-Id: I6fababd4f8b5f8a96bc2f1e72fefdaf089f75d50
Signed-off-by: Vyshakh Krishnan CH <vyshakh.krishnan.c.h@ericsson.com>
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/BgpConfigurationManager.java
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/BgpUtil.java
vpnservice/bgpmanager/bgpmanager-impl/src/main/java/org/opendaylight/netvirt/bgpmanager/commands/Cache.java

index 9a3622b10679481a729dc7c25f6533e38398664e..68e6875d4ca79fda72bfe237944ae9a7be912615 100755 (executable)
@@ -1718,14 +1718,6 @@ public class BgpConfigurationManager {
                 }
             }
 
-            List<Neighbors> n = config.getNeighbors();
-            if (n != null) {
-                LOG.error("configuring existing Neighbors present for replay total neighbors {}", n.size());
-                replayNbrConfig(n, br);
-            } else {
-                LOG.error("no Neighbors present for replay config ");
-            }
-
             List<Vrfs> v = config.getVrfs();
             if (v != null) {
                 for (Vrfs vrf : v) {
@@ -1757,6 +1749,13 @@ public class BgpConfigurationManager {
                     }
                 }
             }
+            List<Neighbors> n = config.getNeighbors();
+            if (n != null) {
+                LOG.error("configuring existing Neighbors present for replay total neighbors {}", n.size());
+                replayNbrConfig(n, br);
+            } else {
+                LOG.error("no Neighbors present for replay config ");
+            }
         }
     }
 
index 2599e0a6c792dbd2f26bc3ada9979635a6cdbe0f..98faf5af3cecf83cbc9d0fb79148855f91cc760d 100755 (executable)
@@ -109,8 +109,8 @@ public class BgpUtil {
             return (Optional<T>) result.get();
         } catch (Exception e) {
             LOG.error("DataStore  read exception {} ", e);
+            throw e;
         }
-        return Optional.absent();
     }
 
     public static <T extends DataObject> void syncWrite(DataBroker broker, LogicalDatastoreType datastoreType,
index 71cf7990a1e1f5b960c21b1bbc7875fc88737adb..348185b711ba745f71d024a4013682ad589ec5c2 100644 (file)
@@ -38,12 +38,12 @@ public class Cache extends OsgiCommandSupport {
     private String action = null;
 
     @Option(name=LST, aliases={"-l"},
-            description="list vrfs and/or networks", 
+            description="list vrfs and/or networks",
             required=false, multiValued=true)
     private List<String> list = null;
 
-    @Option(name=OFL, aliases={"-o"}, 
-            description="output file", 
+    @Option(name=OFL, aliases={"-o"},
+            description="output file",
             required=false, multiValued=false)
     private String ofile = null;
 
@@ -75,7 +75,7 @@ public class Cache extends OsgiCommandSupport {
 
     public Object show() throws Exception {
         return doExecute();
-    } 
+    }
 
     @Override
     protected Object doExecute() throws Exception {
@@ -101,13 +101,13 @@ public class Cache extends OsgiCommandSupport {
         if (list != null) {
             for (String item : list) {
                 switch (item) {
-                    case "vrfs" : 
+                    case "vrfs" :
                         list_vrfs = true;
                         break;
-                    case "networks" : 
+                    case "networks" :
                         list_nets = true;
                         break;
-                    default: 
+                    default:
                         System.err.println("error: unknown value for "+LST+": "+item);
                     return null;
                 }
@@ -116,11 +116,11 @@ public class Cache extends OsgiCommandSupport {
         // we'd normally read this directly from 'config' but
         // legacy behaviour forces to check for a connection
         // that's initiated by default at startup without
-        // writing to config. 
+        // writing to config.
         String cHost = Commands.getBgpManager().getConfigHost();
         int cPort = Commands.getBgpManager().getConfigPort();
         ps.printf("\nConfiguration Server\n\t%s  %s\n\t%s  %d\n",
-                  HTSTR, cHost, PTSTR, cPort); 
+                  HTSTR, cHost, PTSTR, cPort);
         if (config == null) {
             return null;
         }
@@ -141,16 +141,16 @@ public class Cache extends OsgiCommandSupport {
                 s = g.getStalepathTime().intValue();
             }
             ps.printf("\nBGP Router\n");
-            ps.printf("\t%-15s  %d\n\t%-15s  %s\n\t%-15s  %d\n\t%-15s  %s\n",
-                      ASSTR, asNum, RISTR, rid, SPSTR, (s!=0?s:"default"), FBSTR, bit);
+            ps.printf("\t%-15s  %d\n\t%-15s  %s\n\t%-15s  %s\n\t%-15s  %s\n",
+                      ASSTR, asNum, RISTR, rid, SPSTR, (s!=0?Integer.toString(s):"default"), FBSTR, bit);
         }
 
         Logging l = config.getLogging();
         if (l != null) {
-            ps.printf("\t%-15s  %s\n\t%-15s  %s\n", LFSTR, l.getFile(), 
+            ps.printf("\t%-15s  %s\n\t%-15s  %s\n", LFSTR, l.getFile(),
             LLSTR, l.getLevel());
         }
-                                                                                
+
         List<Neighbors> n = config.getNeighbors();
         if (n != null)  {
             ps.printf("\nNeighbors\n");
@@ -169,7 +169,7 @@ public class Cache extends OsgiCommandSupport {
                 List<AddressFamilies> afs = nbr.getAddressFamilies();
                 if (afs != null) {
                     for (AddressFamilies af : afs) {
-                        ps.printf(" %s", af.getSafi().intValue() == 4 ? 
+                        ps.printf(" %s", af.getSafi().intValue() == 4 ?
                                             "IPv4-Labeled-Unicast" : "Unknown");
                     }
                 }
@@ -180,20 +180,20 @@ public class Cache extends OsgiCommandSupport {
         if (list_vrfs) {
             List<Vrfs> v = config.getVrfs();
             if (v != null) {
-                ps.printf("\nVRFs\n"); 
+                ps.printf("\nVRFs\n");
                 for (Vrfs vrf : v)  {
                     ps.printf("\t%s\n",vrf.getRd());
                     ps.printf("\t\t%s  ", IRSTR);
-                    for (String rt : vrf.getImportRts()) 
+                    for (String rt : vrf.getImportRts())
                     ps.printf("%s ", rt);
                     ps.printf("\n\t\t%s  ", ERSTR);
-                    for (String rt : vrf.getExportRts()) 
+                    for (String rt : vrf.getExportRts())
                     ps.printf("%s ", rt);
                     ps.printf("\n");
                 }
             }
         }
-     
+
         if (list_nets) {
             List<Networks> ln = config.getNetworks();
             if (ln != null) {