[OPNFLWPLUG-52] Flow statistics in RESTCONF Operational space not deleted after deleting a flow on OF13 switch, Missing Flow statistics in RESTCONF Operational space after adding a flow on OF10 switch Created: 25/Jan/14 Updated: 27/Sep/21 Resolved: 30/Jan/14 |
|
| Status: | Resolved |
| Project: | OpenFlowPlugin |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | ||
| Reporter: | Madhusudhan Ananderi | Assignee: | Anil Vishnoi |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Windows |
||
| Description |
|
We configure this: PUT http://127.0.0.1:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/139 <flow xmlns="urn:opendaylight:flow:inventory"> In the operational we do not see the flow: GET http://127.0.0.1:8080/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/2 { , } However in the switch, we see a flow with actions=drop: odluser@odl-system-test:~/integration\> sudo ovs-ofctl -O OpenFlow10 dump-flows s1 |
| Comments |
| Comment by Anil Vishnoi [ 25/Jan/14 ] |
|
Hi MAdhusudhar, I pushed fix for this issue recently through following gerrits Controller repo : http://git.opendaylight.org/gerrit/4766 and both of these gerrits are merged now. Thanks |
| Comment by Madhusudhan Ananderi [ 27/Jan/14 ] |
|
ANil, I have verified this issue. It found to be working fine for me. PUT http://127.0.0.1:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/139 (GOOD) <flow xmlns="urn:opendaylight:flow:inventory"> In the switch, I see a flow with actions='dec_ttl' (GOOD) sudo ovs-ofctl -O OpenFlow13 dump-flows s1 When I place DELETE http://127.0.0.1:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/139 I still see the flow stats in Operational space i.e GET http://127.0.0.1:8080/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/2 (BAD) <table> I don't see the flow stats in Config space after DELETE request. (GOOD) Flow stats in the switch is verified. It is deleted. (GOOD) sudo ovs-ofctl -O OpenFlow13 dump-flows s1 |
| Comment by Madhusudhan Ananderi [ 27/Jan/14 ] |
|
PLEASE LOOK INTO MY PREVIOUS COMMENT |
| Comment by Madhusudhan Ananderi [ 27/Jan/14 ] |
|
I had a check on OF10 switch: Before that, I downloaded the latest controller at We still seeing the same issue as reported earlier. We configure this: PUT http://127.0.0.1:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/139 <flow xmlns="urn:opendaylight:flow:inventory"> In the operational we do not see the flow: GET http://127.0.0.1:8080/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/2 { , } However in the switch, we see a flow with actions=drop: odluser@odl-system-test:~/integration\> sudo ovs-ofctl -O OpenFlow10 dump-flows s1 Please let me know the steps on how this got resolved in your case. Thanks, |
| Comment by Madhusudhan Ananderi [ 27/Jan/14 ] |
|
I had a check on OF10 switch: Before that, I downloaded the latest controller at We still seeing the same issue as reported earlier. We configure this: PUT http://127.0.0.1:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/139 <flow xmlns="urn:opendaylight:flow:inventory"> In the operational we do not see the flow: GET http://127.0.0.1:8080/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/2 { , } However in the switch, we see a flow with actions=drop: odluser@odl-system-test:~/integration\> sudo ovs-ofctl -O OpenFlow10 dump-flows s1 Please let me know the steps on how this got resolved in your case. Thanks, |
| Comment by Anil Vishnoi [ 28/Jan/14 ] |
|
Hi Madhusudhan, Regarding Comment-2, I tried the same steps but I am not able to recreate this issue locally. Can you please test it with the latest build and see if you can still see this issue? Apart from that, just want to point out one thing (may be typo), you installing flow with ip <ipv4-destination>10.0.10.1/32</ipv4-destination> but the flow you are dumping on switch has different ip (10.0.30.1) sudo ovs-ofctl -O OpenFlow13 dump-flows s1 I think if you test this scenario with latest build, you won't see this bug. Regarding Comment - 4: OF1.0 enabled switches only have 1 table (table-0), but in this test you are trying to install flow in table/2 so it eventually getting installed in table=0. If you see the flow you dumped on switch odluser@odl-system-test:~/integration\> sudo ovs-ofctl -O OpenFlow10 dump-flows s1 It got installed in table=0. Now when statistics-manager fetches the flow statistics for flow, it return table=0 and not table=2, that user provided. So stats trying to match with flows in table=0 and it doesn't match to any of the flow already present in the config data store and hence statistics-manager augment/store these stats in table/0 with special id 1001. Format of the special flow ids is [1-tableid-0-flow counter], but I changed this format in one of the recent gerrit https://git.opendaylight.org/gerrit/#/c/4888/). We call these flows unaccounted flows, and these unaccounted flows are not associated with any of the flows exist in the config data store. So whenever you delete your previously installed flow, it tries to clean the associated stats, but because there is no associated stats, it returns. All the unaccounted flow gets cleaned up when statistics manager don't see any stats update for that flow from switch for 2 stats collection cycle. So you will have to wait for around 30 seconds (current stats collection time interval = 15 sec) for these unaccounted flow to get cleaned up, given that you won't get any stats update from switch for these flows. There was one bug in this clean-up which i fixed and pushed through above mentioned gerrit. In the test you mentioned in comment 4, you are dumping stats for wrong table, if you dump stats for table/0, you probably will see the flow stats. Apart from that the reason you see action=drop is because you are trying to install flow with action = dec_nw_ttl, and that's not supported by openflow 1.0 enabled switch.So looks like plugin eventually discard that, and installs flow with no action and that resulted in action=drop. Can you please re-test this case with correct table id and see if you are still able to recreate this issue. I would recommend to use the latest build. Thanks |