-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Treat OF groups and meters the same when initializing flows (#5613)
* Treat OF groups and meters the same when initializing flows Both meter and group entries need to be deleted before initializing / replaying flows, to avoid possible conflicts with existing objects. Until now, meter entries were deleted by Antrea in the OFClient's Initialize method, while group entries were deleted by the ofnet library for every switch connection / re-connection. We now treat both meter and group entries the same: * ofnet is no longer in charge of deleting group entries * all meter and group entries are deleted by Antrea before replaying flows (in the OFClient's initialize method) We also remove a stale comment in the Agent initialization code. Note that this deletion operation is mostly needed in the following scenario: the antrea-agent container restarts while the antrea-ovs container keeps running. In that case, all OF entries are replayed, but previous entries (group & meter) can still be present because OVS daemons were not restarted. The code takes a more general approach of deleting entries every time flows are replayed, including in the following situations: * antrea-ovs container / OVS daemons are restarted: in this case group and meter tables are empty, so the deletion is a no-op. * spurious re-connection without any process dying: not sure this can happen in practice. * Replace max_len=128 with max_len=65535 in expected OF flows in tests This is because of a change in the ofnet library. 65535 means that there is no buffering and that the full packet is sent to the controller. This is actually the only value supported by OVS, and the ofnet library now defaults to it (since v0.10). Signed-off-by: Antonin Bas <[email protected]>
- Loading branch information
1 parent
d921767
commit ec2f6f8
Showing
13 changed files
with
91 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.