[OPNFLWPLUG-737] Flow duration is reset upon resetting manager on switch Created: 22/Jul/16 Updated: 27/Sep/21 Resolved: 12/Dec/17 |
|
| Status: | Resolved |
| Project: | OpenFlowPlugin |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Bertrand Low | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 6260 |
| Description |
|
This is to track the following behaviour (observed as recently as tcp:192.168.56.101:6640): setup:
Flow durations are now “reset” when the switch is reconnected by resetting the manager on the switch: E.g. |
| Comments |
| Comment by Bertrand Low [ 22/Jul/16 ] |
|
This behaviour is due to https://git.opendaylight.org/gerrit/#/c/40744/ and has been discussed on the threads:
Community to determine if this is an issue or not. |
| Comment by Bertrand Low [ 22/Jul/16 ] |
|
Amendment to Description: This behaviour has been observed as recently as distribution-karaf-0.5.0-20160722.183255 |
| Comment by Bertrand Low [ 26/Jul/16 ] |
|
Possible fix is to revert https://git.opendaylight.org/gerrit/#/c/40744/ and apply https://git.opendaylight.org/gerrit/#/c/38895/ |
| Comment by Anil Vishnoi [ 26/Jul/16 ] |
|
Hi Bertrand, Reverting this will enable the inconsistent behavior of the plugin when it comes to modifying the flow. There are two scenario when it comes to updating the flows (1) User installs the flow, flow installs successfully on the switch, user modify the flow and it gets updated on the switch. So basically it shows that modifying the flow in data store will modify your flow. (2) User installs the flow, but flow installation on the switch fails because of the wrong action (e.g using the port that is not available on the switch), then user modifying the flow with correct action/match, but flow installation fails, because when you send FLOW_MODE( MODIFY), to the switch, switch will reject this request if flow don't exist on the switch. So in this scenario, modifying the flow is not working. So modifying the flow in data store is working based on the scenario. That change done through https://git.opendaylight.org/gerrit/#/c/40744/ make this consistent. With this change, modifying flow in data store will work in both the scenario, but this has a side effect that the duration will be reset. |
| Comment by Bertrand Low [ 12/Aug/16 ] |
|
Hi Anil, thanks for explaining the two scenarios. I have recently pulled in the master branch and rebased and applied patch 38895 and reverted patch 40744 and tested the two scenarios. (1) I've installed the following flows via REST calls to the config data store, which were then successfully pushed to the switch: root@mininet-vm:~# ovs-ofctl dump-flows s1 I then subsequently modified the flows, in quick succession, via REST and was able to both modify the flow in the data store and also on the switch without resetting the flow duration: root@mininet-vm:~# ovs-ofctl dump-flows s1 root@mininet-vm:~# ovs-ofctl dump-flows s1 Here is the log in the switch showing the flow commands that it received: Aug 11 15:31:31 mininet-vm ovs-vswitchd: ovs|00314|connmgr|INFO|s1<->tcp:192.168.56.101:6653: 5 flow_mods 10 s ago (5 adds) (2) I've installed the following flow in the config data store via REST: <?xml version="1.0" encoding="UTF-8" standalone="no"?> but this flow fails to be pushed onto the switch (running OVS 2.5.0) due to this error: Aug 11 16:43:33 mininet-vm ovs-vswitchd: ovs|00831|nx_match|WARN|Rejecting NXM/OXM entry 0:32768:12:1:8 with 1-bits in value for bits wildcarded by the mask. I then modified the flow in the config data store via REST by changing the <ipv4-destination-address-no-mask> to: Please let me know if the above behaviour is desirable and I will submit a new patch with the changes for review by the community. |
| Comment by Anil Vishnoi [ 12/Aug/16 ] |
|
Hi Bertrand, This flow that you are modifying and installing again is basically changing the match construct in the flow (ip-address). Whenever you change the match, it's a new flow as per plugin, because as per openflowplugin spec, you can't modify the match construct of the flow, you can only modify the actions/instructions of the flow. As i mentioned in my previous comment, if you install a flow that has wrong actions/instructions and try to modify the flow again with correct actions/instruction, it will not work. |
| Comment by Bertrand Low [ 15/Aug/16 ] |
|
Hi Anil, Sorry, I may be misunderstanding or missing a code path for the updating of flows. Would greatly appreciate some clarification. Do you mean that the logic of patch 38895 is incorrect, or that it was applied to the OFRpcTaskFactory, which no longer appears to be involved in the code path for the adding/updating of flows. I have ported a similar fix to patch 38895 to the updateFlow() method in the SalFlowServiceImpl class. With this logic in place in SalFlowServiceImpl.updateFlow(), the flow example provided in |
| Comment by Anil Vishnoi [ 16/Aug/16 ] |
|
Hi Bertrand, I think we both are on same page. In your patch, you are making a read transaction to the data store to check if the flow exist in the data store or not. It has two issues So overall, after discussing this with other committer, we thought that we should go with the approach we have currently in the plugin. |
| Comment by Bertrand Low [ 16/Aug/16 ] |
|
Hi Anil, thanks for clarifying. Feel free to change this bug's Importance or close it as you see fit. |