-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redundant Openflow messages are sent when syncing an updated group to OVS #4159
Labels
action/release-note
Indicates a PR that should be included in release notes.
area/proxy
Issues or PRs related to proxy functions in Antrea
kind/bug
Categorizes issue or PR as related to a bug.
Milestone
Comments
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
Aug 29, 2022
Fix antrea-io#4159 This PR fix the issue by appending buckets directly in `Done()` in pkg/ovs/openflow/ofctrl_group.go instead of calling `AddBuckets` method of `Group` defined in the ofnet which sends an Openflow message to install the group. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
@hongliangl nice catch! |
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
Aug 29, 2022
Fix antrea-io#4159 This PR fix the issue by appending buckets directly in `Done()` in pkg/ovs/openflow/ofctrl_group.go instead of calling `AddBuckets` method of `Group` defined in the ofnet which sends an Openflow message to install the group. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
Aug 29, 2022
Fix antrea-io#4159 This PR fix the issue by appending buckets directly in `Done()` in pkg/ovs/openflow/ofctrl_group.go instead of calling `AddBuckets` method of `Group` defined in the ofnet which sends an Openflow message to install the group. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
Aug 29, 2022
Fix antrea-io#4159 This PR fix the issue by appending buckets directly in `Done()` in pkg/ovs/openflow/ofctrl_group.go instead of calling `AddBuckets` method of `Group` defined in the ofnet which sends an Openflow message to install the group. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
Aug 29, 2022
Fix antrea-io#4159 This PR fix the issue by appending buckets directly in `Done()` in pkg/ovs/openflow/ofctrl_group.go instead of calling `AddBuckets` method of `Group` defined in the ofnet which sends an Openflow message to install the group. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
Aug 29, 2022
Fix antrea-io#4159 This PR fix the issue by appending buckets directly in `Done()` in pkg/ovs/openflow/ofctrl_group.go instead of calling `AddBuckets` method of `Group` defined in the ofnet which sends an Openflow message to install the group. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
hongliangl
added a commit
to hongliangl/antrea
that referenced
this issue
Aug 29, 2022
Fix antrea-io#4159 This PR fix the issue by appending buckets directly in `Done()` in pkg/ovs/openflow/ofctrl_group.go instead of calling `AddBuckets` method of `Group` defined in the ofnet which sends an Openflow message to install the group. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
heanlan
pushed a commit
to heanlan/antrea
that referenced
this issue
Mar 29, 2023
antrea-io#4160) Fix antrea-io#4159 This PR fix the issue by appending buckets directly in `Done()` in pkg/ovs/openflow/ofctrl_group.go instead of calling `AddBuckets` method of `Group` defined in the ofnet which sends an Openflow message to install the group. Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
action/release-note
Indicates a PR that should be included in release notes.
area/proxy
Issues or PRs related to proxy functions in Antrea
kind/bug
Categorizes issue or PR as related to a bug.
Describe the bug
For example, when syncing an ClusterIP Service whose Endpoints has been changed,
Function in the following is called in pkg/agent/openflow/client.go, we can see that variable
group
is returned byserviceEndpointGroup
, then call the methodAdd()
to sync the group to OVS.We can see the code of method
Add()
in pkg/ovs/openflow/ofctrl_group.go:We can see the the method
Install()
ofg.ofctrl
in lib ofnet https://github.com/antrea-io/ofnet/blob/716e8ccd4ba3713d3b38ff2f808e698749d9de79/ofctrl/fgraphGroup.go#L76However, in
serviceEndpointGroup
which is used to generategroup
in /pkg/agent/openflow/pipeline.go, we can see that when adding a new bucket, thenDone()
is called.We can see the code in
Done()
in /pkg/ovs/openflow/ofctrl_group.go,AddBuckets
is called.AddBuckets
is defined in lib ofnet https://github.com/antrea-io/ofnet/blob/716e8ccd4ba3713d3b38ff2f808e698749d9de79/ofctrl/fgraphGroup.go#L58:We can see that if
self.isInstalled
is true (this means that when updating the group),Install()
is called.Take a simple example, when syncing a updated Service which has 3 Endpoints, there are
Done()
to generate bucket 0)Done()
to generate bucket 1)Done()
to generate bucket 2)Add()
to install the group)Only the last Openflow is needed when syncing an updated group to OVS. To fix the issue, the code in
Done()
could be:The text was updated successfully, but these errors were encountered: