[OPNFLWPLUG-40] Session for the cookie exception should not be occuring Created: 23/Jan/14  Updated: 27/Sep/21  Due: 24/Jan/14  Resolved: 24/Jan/14

Status: Resolved
Project: OpenFlowPlugin
Component/s: General
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Jan Medved Assignee: Michal Rehak
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS
Platform: Macintosh


External issue ID: 346

 Description   

When an app (on top of MD-SAL) attempts to program a flow in a switch that is not connected to the controller, the following exceptions is thrown:

2014-01-23 04:41:37.696 PST [md-sal-binding-notification-35] ERROR o.o.c.s.c.FlowProgrammerAdapter - Execution exception occured during processing flow
java.lang.IllegalArgumentException: Session for the cookie is invalid.
at org.opendaylight.openflowplugin.openflow.md.core.session.MessageDispatchServiceImpl.getConnectionAdapter(MessageDispatchServiceImpl.java:97) ~[na:na]
at org.opendaylight.openflowplugin.openflow.md.core.session.MessageDispatchServiceImpl.flowMod(MessageDispatchServiceImpl.java:128) ~[na:na]
at org.opendaylight.openflowplugin.openflow.md.core.sal.ModelDrivenSwitchImpl.addFlow(ModelDrivenSwitchImpl.java:248) ~[na:na]
at org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService$$Broker$Router.addFlow(SalFlowService$$Broker$Router.java) ~[na:na]
at org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService$$Broker$DirectProxy.addFlow(SalFlowService$$Broker$DirectProxy.java) ~[na:na]
at org.opendaylight.controller.frm.flow.FlowTransaction.add(FlowTransaction.java:114) ~[na:na]
at org.opendaylight.controller.frm.AbstractTransaction.rollbackRpcs(AbstractTransaction.java:112) ~[na:na]
at org.opendaylight.controller.frm.AbstractTransaction.rollback(AbstractTransaction.java:38) ~[na:na]
at org.opendaylight.controller.md.sal.common.impl.service.TwoPhaseCommit.rollback(TwoPhaseCommit.java:147) ~[na:na]
at org.opendaylight.controller.md.sal.common.impl.service.TwoPhaseCommit.call(TwoPhaseCommit.java:104) ~[na:na]
at org.opendaylight.controller.md.sal.common.impl.service.TwoPhaseCommit.call(TwoPhaseCommit.java:31) ~[na:na]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]

This exception should not be thrown, since this is not an error condition in the controller, but in the network. We should log it (INFO level), and/or increment a counter for errors.



 Comments   
Comment by Michal Rehak [ 24/Jan/14 ]

Changed exception message so that it contains possible reasons of invalid session. This exception is propagated to 2phase commit transaction where the transaction is rolled back. Now it is up to commit mechanism what to put into log.

Generated at Wed Feb 07 20:31:25 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.