[OPNFLWPLUG-841] Openflow plugin loses flow statistics Created: 10/Jan/17 Updated: 27/Sep/21 Resolved: 01/Jun/17 |
|
| Status: | Resolved |
| Project: | OpenFlowPlugin |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Jon Castro | Assignee: | Jon Castro |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 7501 |
| Description |
|
When processing statistics responses from switches, the openflow plugin executes in parallel delete old flows and write new flows. This means flows could be deleted if the delete actions happens after the write action. In order to update flow stats, the Openflow plugin makes a request for stats to connected switches. When the Openflow plugin receives a response it attempts to update the flow stats in the operational datastore. The intended logic is as follows: 1) Delete existing flows There are two scenarios where there is an issue in the current code: 1) Handling the update of stats Both the delete and write actions were being executed in the background using 'futures'. To fix the issue, the delete operation should not be executed in the background, instead it should be executed by the currently running thread immediately, before creating futures to perform the writes. This guarantees the order of execution. 2) Handling a multi-part response. The same logic is used as above. But in addition, the writes must only be committed once all part of the multi-part have been executed. |
| Comments |
| Comment by Jon Castro [ 30/Jan/17 ] |
| Comment by Tomas Slusny [ 24/May/17 ] |
|
Master branch gerrit: https://git.opendaylight.org/gerrit/#/c/53368/ |
| Comment by Tomas Slusny [ 01/Jun/17 ] |
|
Patch on master branch was merged, closing. |