Only raise alarm when RDs less than nexthops 45/73645/4
authoreswanit <swati.udhavrao.niture@ericsson.com>
Fri, 25 May 2018 06:28:13 +0000 (11:58 +0530)
committerSam Hague <shague@redhat.com>
Tue, 3 Jul 2018 11:56:21 +0000 (11:56 +0000)
In checkAlarmExtraRoutes, when number of RDs are lesser
than number of nexthops, ECMP code was not getting
triggered.

Hence, when number of RDs are lesser
than number of nexthops, then just raise the alarm.

Previously, in routesError, there were few routes which
were raised in alarm and not supposed to be used,
but now, we are not maintaining any error routes.

Plus, we already have a patch
https://git.opendaylight.org/gerrit/#/c/55726/
Here, if number of RDs are lesser than number of CSSs,
then the extra-routes, which are configured behind the CSS
for which RD is not allocated, are saved.
These unprocessed extra-routes will be handled during
vpn-instance update when new RDs are added.

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

index 468285ceaaefe78088250176c50d6456639abc5d..1f01ddeb0117a46b7e4bf826d258efc174bae65a 100644 (file)
@@ -2067,7 +2067,6 @@ public class NeutronvpnManager implements NeutronvpnService, AutoCloseable, Even
                     vpnId);
             return;
         }
-        List<Routes> routesError = new ArrayList();
         for (Routes route : routeList) {
             // count  the number of nexthops for each same route.getDestingation().getValue()
             String destination = String.valueOf(route.getDestination().getValue());
@@ -2132,14 +2131,10 @@ public class NeutronvpnManager implements NeutronvpnService, AutoCloseable, Even
 
             if (rdList.size() < nbNextHops) {
                 neutronvpnAlarm.raiseNeutronvpnAlarm(typeAlarm, detailsAlarm.toString());
-                LOG.error("there are too many next hops for prefixe in vpn {}", vpnId);
-                routesError.add(route);
             } else {
                 neutronvpnAlarm.clearNeutronvpnAlarm(typeAlarm, detailsAlarm.toString());
             }
         }
-        //in routesError there are a few route raised in alarm, so they have not to be used
-        routeList.removeAll(routesError);
     }
 
     // TODO Clean up the exception handling