[OPNFLWPLUG-50] Flow removed works only for 1 flow and 2nd flow remove does not work. Created: 24/Jan/14  Updated: 27/Sep/21  Resolved: 26/Jan/14

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

Type: Bug
Reporter: Prasanna Huddar Assignee: Prasanna Huddar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows
Platform: PC


External issue ID: 365

 Description   

This is how I tested:
1. Run ODL
2. Run Mininet: sudo mn --topo single,3 --controller
'remote,ip=192.168.56.1' --switch ovsk,protocols=OpenFlow13
3. Add flows

osgi> addMDFlow openflow:1 f4

ovs> sudo ovs-ofctl -OOpenFLow13 dump-flows s1
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0xa, duration=10.071s, table=2, n_packets=0, n_bytes=0,
send_flow_rem
priority=2,ip,dl_src=00:00:00:00:00:00/ff:ff:ff:00:00:00,dl_dst=ff:ff:00:00:
00:00/ff:ff:00:00:00:00 actions=drop

osgi> addMDFlow openflow:1 f5

ovs> sudo ovs-ofctl -OOpenFLow13 dump-flows s1
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0xa, duration=0.757s, table=2, n_packets=0, n_bytes=0, send_flow_rem
priority=2,ip,nw_dst=10.0.0.0/24 actions=drop
cookie=0xa, duration=37.356s, table=2, n_packets=0, n_bytes=0,
send_flow_rem
priority=2,ip,dl_src=00:00:00:00:00:00/ff:ff:ff:00:00:00,dl_dst=ff:ff:00:00:
00:00/ff:ff:00:00:00:00 actions=drop

Everything is OK! Then:

4. Remove flows
osgi> removeMDFlow openflow:1 f4
2014-01-23 11:05:20.198 PST [md-sal-binding-notification-2] ERROR
o.o.c.sal.binding.impl.NotifyTask - Unhandled exception thrown by listener:
org.opendaylight.controller.sal.compatibility.FlowProgrammerAdapter$$Broker$
ListenerInvoker@5c7bf2e2
java.lang.NullPointerException: null
at
org.opendaylight.controller.sal.compatibility.NodeMapping.toADNode(NodeMappi
ng.java:274) ~[na:na]
at
org.opendaylight.controller.sal.compatibility.FlowProgrammerAdapter.onFlowRe
moved(FlowProgrammerAdapter.java:201) ~[na:na]
at
org.opendaylight.controller.sal.compatibility.FlowProgrammerAdapter$$Broker$
ListenerInvoker.onNotification(FlowProgrammerAdapter$$Broker$ListenerInvoker
.java) ~[na:na]
at
org.opendaylight.controller.sal.binding.impl.NotifyTask.call(NotifyTask.java
:59) ~[na:na]
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
~[na:1.7.0_25]
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
~[na:1.7.0_25]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
45) ~[na:1.7.0_25]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
15) ~[na:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
Status of Flow Data Loaded Transaction: COMMITED

ovs> sudo ovs-ofctl -OOpenFLow13 dump-flows s1
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0xa, duration=79.276s, table=2, n_packets=0, n_bytes=0,
send_flow_rem priority=2,ip,nw_dst=10.0.0.0/24 actions=drop

osgi> removeMDFlow openflow:1 f5
osgi> Status of Flow Data Loaded Transaction: COMMITED

Flow still in switch.

sudo ovs-ofctl -OOpenFLow13 dump-flows s1:
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0xa, duration=138.365s, table=2, n_packets=0, n_bytes=0,
send_flow_rem priority=2,ip,nw_dst=10.0.0.0/24 actions=drop



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

Fixed by https://git.opendaylight.org/gerrit/#/c/4769/

By removing the whole switch has been removed from both datastore contexts (config+operational). Now only config context is modified when removing flow and switch is preserved.

Please test

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