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>
// 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);