Skip to content
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

Optimize Egress sync process #2884

Merged
merged 1 commit into from Oct 22, 2021
Merged

Optimize Egress sync process #2884

merged 1 commit into from Oct 22, 2021

Conversation

Jexf
Copy link
Member

@Jexf Jexf commented Oct 12, 2021

  1. Ignore handling the Egress with empty Egress IP in Antrea Agent addEgress event.
  2. Compare CR Generation in informer update event to ignore CR Status change.
  3. Ignore handling the Egress IP Add event in onLocalIPUpdate process, which the IP already has been assigned by ipAssigner.

Fixes: #2880

Signed-off-by: Wu zhengdong zhengdong.wu@transwarp.io

@Jexf
Copy link
Member Author

Jexf commented Oct 12, 2021

/test-all
/test-ipv6-only
/test-ipv6-all
/test-e2e

@codecov-commenter
Copy link

codecov-commenter commented Oct 12, 2021

Codecov Report

Merging #2884 (5c8bab1) into main (95e836d) will decrease coverage by 8.93%.
The diff coverage is 24.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2884      +/-   ##
==========================================
- Coverage   61.18%   52.24%   -8.94%     
==========================================
  Files         284      283       -1     
  Lines       23494    23797     +303     
==========================================
- Hits        14374    12432    -1942     
- Misses       7565     9979    +2414     
+ Partials     1555     1386     -169     
Flag Coverage Δ
kind-e2e-tests 31.41% <0.00%> (-17.25%) ⬇️
unit-tests 40.60% <24.00%> (-0.28%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/agent/controller/egress/egress_controller.go 38.32% <0.00%> (-1.47%) ⬇️
pkg/agent/memberlist/cluster.go 72.24% <100.00%> (+0.26%) ⬆️
pkg/controller/egress/controller.go 84.17% <100.00%> (+0.05%) ⬆️
pkg/controller/types/networkpolicy.go 0.00% <0.00%> (-100.00%) ⬇️
...g/agent/apiserver/handlers/featuregates/handler.go 0.00% <0.00%> (-82.36%) ⬇️
pkg/agent/controller/networkpolicy/packetin.go 4.50% <0.00%> (-67.50%) ⬇️
pkg/apis/controlplane/v1beta2/helper.go 33.33% <0.00%> (-66.67%) ⬇️
...formers/externalversions/security/v1alpha1/tier.go 0.00% <0.00%> (-64.29%) ⬇️
...ers/externalversions/core/v1alpha2/clustergroup.go 0.00% <0.00%> (-64.29%) ⬇️
...s/externalversions/core/v1alpha2/externalentity.go 0.00% <0.00%> (-64.29%) ⬇️
... and 110 more

@Jexf
Copy link
Member Author

Jexf commented Oct 12, 2021

/test-e2e
/test-ipv6-e2e

pkg/agent/controller/egress/egress_controller.go Outdated Show resolved Hide resolved
pkg/agent/controller/egress/egress_controller.go Outdated Show resolved Hide resolved
pkg/controller/egress/controller.go Outdated Show resolved Hide resolved
pkg/agent/controller/egress/egress_controller.go Outdated Show resolved Hide resolved
pkg/agent/controller/egress/egress_controller.go Outdated Show resolved Hide resolved
pkg/agent/controller/egress/egress_controller.go Outdated Show resolved Hide resolved
pkg/agent/memberlist/cluster.go Outdated Show resolved Hide resolved
pkg/agent/controller/egress/egress_controller.go Outdated Show resolved Hide resolved
@Jexf
Copy link
Member Author

Jexf commented Oct 14, 2021

/test-all
/test-ipv6-only
/test-ipv6-all
/test-e2e
/test-ipv6-e2e

@Jexf Jexf requested review from tnqn and antoninbas October 14, 2021 07:41
@Jexf
Copy link
Member Author

Jexf commented Oct 21, 2021

@tnqn Can you help me review this PR again?

1. Ignore handling the Egress with empty Egress IP in Antrea Agent addEgress events.
2. Compare CR Generation to ignore CR Status changes in informer update events.

Signed-off-by: Wu zhengdong <zhengdong.wu@transwarp.io>
@Jexf
Copy link
Member Author

Jexf commented Oct 22, 2021

/test-all
/test-ipv6-only
/test-ipv6-all

Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tnqn tnqn merged commit 724b74a into antrea-io:main Oct 22, 2021
@Jexf Jexf deleted the egress-fix branch October 22, 2021 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicated Egress sync processing in Antrea Agent
5 participants