X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=elanmanager%2Fimpl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetvirt%2Felan%2Finternal%2FElanInterfaceManager.java;h=b2f6e311ccc6e8e1a5f5e0d7d7233e2e01824f3c;hb=2bb99fe69d823fa98d49f9ed900030079231cfe5;hp=cd513bebf32a4f05f59fced896aa585e822e5312;hpb=c6d5f7e102dc7a13d7bc795e294d52a4c5d01905;p=netvirt.git diff --git a/elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/ElanInterfaceManager.java b/elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/ElanInterfaceManager.java index cd513bebf3..b2f6e311cc 100644 --- a/elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/ElanInterfaceManager.java +++ b/elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/internal/ElanInterfaceManager.java @@ -15,6 +15,7 @@ import com.google.common.base.Preconditions; import com.google.common.collect.Lists; import com.google.common.util.concurrent.ListenableFuture; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.math.BigInteger; import java.util.ArrayList; import java.util.Collections; @@ -950,20 +951,28 @@ public class ElanInterfaceManager extends AsyncDataTreeChangeListenerBase flowTx) { - int ifTag = interfaceInfo.getInterfaceTag(); - Flow flow = MDSALUtil.buildFlow(NwConstants.ELAN_FILTER_EQUALS_TABLE, + try { + int ifTag = interfaceInfo.getInterfaceTag(); + Flow flow = MDSALUtil.buildFlow(NwConstants.ELAN_FILTER_EQUALS_TABLE, getFlowRef(NwConstants.ELAN_FILTER_EQUALS_TABLE, ifTag, "group")); - mdsalManager.removeFlow(flowTx, interfaceInfo.getDpId(), flow); + mdsalManager.removeFlow(flowTx, interfaceInfo.getDpId(), flow); - Flow flowEntity = MDSALUtil.buildFlowNew(NwConstants.ELAN_FILTER_EQUALS_TABLE, + Flow flowEntity = MDSALUtil.buildFlowNew(NwConstants.ELAN_FILTER_EQUALS_TABLE, getFlowRef(NwConstants.ELAN_FILTER_EQUALS_TABLE, ifTag, "drop"), 10, elanInfo.getElanInstanceName(), 0, 0, ElanConstants.COOKIE_ELAN_FILTER_EQUALS.add(BigInteger.valueOf(ifTag)), getMatchesForFilterEqualsLPortTag(ifTag), MDSALUtil.buildInstructionsDrop()); - mdsalManager.removeFlow(flowTx, interfaceInfo.getDpId(), flowEntity); + mdsalManager.removeFlow(flowTx, interfaceInfo.getDpId(), flowEntity); + } catch (Exception e) { + LOG.error("Error removing flow", e); + throw new RuntimeException("Error removing flow", e); + } } private List getRemoteBCGroupBucketInfos(ElanInstance elanInfo, int bucketKeyStart,