Tunnel showing wrong state in scale setups 50/54750/2
authorFaseela K <faseela.k@ericsson.com>
Tue, 11 Apr 2017 08:21:27 +0000 (13:51 +0530)
committerFaseela K <faseela.k@ericsson.com>
Fri, 14 Apr 2017 10:02:32 +0000 (10:02 +0000)
In a scaled environment, when BFD flaps continuously,
interface-manager was showing the wrong tunnel-state in the end,
This is because interface-state in cache will have stale oper-status
leading to race conditions, during frequent toggling events.
Read from cache should be avoided in such conditions.

Change-Id: I878afb51f1da41f50e7f853cf0dbce35e5b96136
Signed-off-by: Faseela K <faseela.k@ericsson.com>
interfacemanager/interfacemanager-impl/src/main/java/org/opendaylight/genius/interfacemanager/renderer/ovs/statehelpers/OvsInterfaceTopologyStateUpdateHelper.java

index 95e85c48b9e8246fde7270e0e3600c52cc5b1c29..a9e5923524d9ca401502d6a46c957db10f5cc882 100644 (file)
@@ -78,7 +78,7 @@ public class OvsInterfaceTopologyStateUpdateHelper {
             // of BFD monitoring
             final List<ListenableFuture<Void>> futures = new ArrayList<>();
             final Interface interfaceState = InterfaceManagerCommonUtils
-                    .getInterfaceState(terminationPointNew.getName(), dataBroker);
+                    .getInterfaceStateFromOperDS(terminationPointNew.getName(), dataBroker);
             if (interfaceState != null && interfaceState.getOperStatus() != Interface.OperStatus.Unknown
                     && interfaceState.getOperStatus() != interfaceBfdStatus) {
                 LOG.debug("updating tunnel state for interface {} as {}", interfaceName, interfaceBfdStatus);