Description: An issue is observed when
ElanLearnVpnVip MIP MAC and Interface
MAC are same. During migration,
ElanLearntVpnVipToPortListener remove
deletes MAC entry from ElanInterfaceForwardingEntries,
which is referred by ElanInterfaceStateChangeListener
remove workflow, which is started after the
ElanInterfaceForwardingEntries thread
completes its course of action. Both threads
have an action to delete DMAC flow entries,
but the first thread refers InterfaceManager for
InterfaceInfo which returns null, hence skips the
delete DMAC workflow, but deletes the MAC entry.
Other thread refers MAC entry, which has been deleted
by first thread, hence this too skips delete workflow.
This fix address the problem by deleting MAC entry in
first thread, only if InterfaceInfo is not null so that second
thread can delete DMAC entry as well delete MAC entry
during its course of action.
Change-Id: Icc7d15b62f6aaa3b1bae1844d9a013043b8d541d
Signed-off-by: ashwinbc <ashwin.b.c@ericsson.com>
InterfaceInfo interfaceInfo = interfaceManager.getInterfaceInfo(interfaceName);
if (macEntry != null && interfaceInfo != null) {
elanUtils.deleteMacFlows(elanInstanceCache.get(elanName).orNull(), interfaceInfo, macEntry, flowTx);
+ interfaceTx.delete(LogicalDatastoreType.OPERATIONAL,
+ ElanUtils.getInterfaceMacEntriesIdentifierOperationalDataPath(interfaceName, physAddress));
+ interfaceTx.delete(LogicalDatastoreType.OPERATIONAL,
+ ElanUtils.getMacEntryOperationalDataPath(elanName, physAddress));
}
- interfaceTx.delete(LogicalDatastoreType.OPERATIONAL,
- ElanUtils.getInterfaceMacEntriesIdentifierOperationalDataPath(interfaceName, physAddress));
- interfaceTx.delete(LogicalDatastoreType.OPERATIONAL,
- ElanUtils.getMacEntryOperationalDataPath(elanName, physAddress));
}
}