From: Alessandro Boch Date: Tue, 14 Jan 2014 23:19:36 +0000 (-0800) Subject: FRM should not remove a static flow config on async error report X-Git-Tag: jenkins-controller-bulk-release-prepare-only-2-1~82^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=ee0a16926c26d70160b739d49ef48f1c2436f96b;hp=1dd1433d1e2f30855b098cca7cc48039a9747df8 FRM should not remove a static flow config on async error report - Currently FRM is removing the affected static flow config on receiving a flow error event from the switch. The correct action is to modify the config status. The config removal was a temporary fix for the flow configuration across cluster (request served by another controller node) when this request was always sent asynchronously. Now it is no longer needed as FRM implements both the synch and async flow rewust across the cluster. Change-Id: If2d473cd4688bdf83ecc0a0f5eb210b938157d29 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 2b3347f312..41075b9554 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 @@ -2994,7 +2994,11 @@ public class ForwardingRulesManager implements // staticFlowEntry should never be null. // the null check is just an extra defensive check. if(staticFlowEntry != null) { - staticFlows.remove(staticFlowEntry.getKey()); + // Modify status and update cluster cache + log.debug("Updating static flow configuration on async error event"); + String status = String.format("Cannot be installed on node. reason: %s", errorString); + staticFlowEntry.getValue().setStatus(status); + refreshClusterStaticFlowsStatus(node); } } }