From: Alessandro Boch Date: Fri, 27 Sep 2013 23:11:10 +0000 (-0700) Subject: Fix bug in FRM X-Git-Tag: releasepom-0.1.0~4 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=a441b2aba2cf3207266d478ab0587dd1347a8910 Fix bug in FRM ISSUE: Accessing workOrder mapping providing the wrong key object Change-Id: I70c704566c6adede3f11348019f0d1da2f7eb43e Signed-off-by: Alessandro Boch --- diff --git a/opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/ForwardingRulesManager.java b/opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/ForwardingRulesManager.java index f12074b22f..c19820bcf9 100644 --- a/opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/ForwardingRulesManager.java +++ b/opendaylight/forwardingrulesmanager/implementation/src/main/java/org/opendaylight/controller/forwardingrulesmanager/internal/ForwardingRulesManager.java @@ -38,7 +38,6 @@ import org.opendaylight.controller.clustering.services.ICacheUpdateAware; import org.opendaylight.controller.clustering.services.IClusterContainerServices; import org.opendaylight.controller.clustering.services.IClusterServices; import org.opendaylight.controller.configuration.IConfigurationContainerAware; -import org.opendaylight.controller.sal.connection.ConnectionLocality; import org.opendaylight.controller.connectionmanager.IConnectionManager; import org.opendaylight.controller.forwardingrulesmanager.FlowConfig; import org.opendaylight.controller.forwardingrulesmanager.FlowEntry; @@ -56,6 +55,7 @@ import org.opendaylight.controller.sal.action.Controller; import org.opendaylight.controller.sal.action.Flood; import org.opendaylight.controller.sal.action.Output; import org.opendaylight.controller.sal.action.PopVlan; +import org.opendaylight.controller.sal.connection.ConnectionLocality; import org.opendaylight.controller.sal.core.Config; import org.opendaylight.controller.sal.core.ContainerFlow; import org.opendaylight.controller.sal.core.IContainer; @@ -118,7 +118,7 @@ public class ForwardingRulesManager implements private ConcurrentMap> portGroupData; private ConcurrentMap TSPolicies; private boolean inContainerMode; // being used by global instance only - private boolean stopping; + protected boolean stopping; /* * Flow database. It's the software view of what was requested to install @@ -180,7 +180,7 @@ public class ForwardingRulesManager implements * not picked by anyone, which is always a case can happen especially on * Node disconnect cases. */ - private ConcurrentMap workOrder; + protected ConcurrentMap workOrder; /* * Data structure responsible for retrieving the results of the workOrder @@ -193,7 +193,7 @@ public class ForwardingRulesManager implements * TODO: The workStatus entries need to have a lifetime associated in case * of requestor controller leaving the cluster. */ - private ConcurrentMap workStatus; + protected ConcurrentMap workStatus; /* * Local Map used to hold the Future which a caller can use to monitor for @@ -1126,7 +1126,7 @@ public class ForwardingRulesManager implements * merged flow may conflict with an existing old container flows merged flow * on the network node */ - private void updateFlowsContainerFlow() { + protected void updateFlowsContainerFlow() { Set toReInstall = new HashSet(); // First remove all installed entries for (ConcurrentMap.Entry entry : installedSwView.entrySet()) { @@ -2548,7 +2548,7 @@ public class ForwardingRulesManager implements logsync.trace("Executing the workOrder {}", fe); Status gotStatus = null; FlowEntryInstall feiCurrent = fe.getEntry(); - FlowEntryInstall feiNew = workOrder.get(fe.getEntry()); + FlowEntryInstall feiNew = workOrder.get(fe); switch (fe.getUpType()) { case ADDED: /*