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

Fix importer issue after leader controller restart #3596

Merged
merged 1 commit into from
Apr 12, 2022

Conversation

luolanzone
Copy link
Contributor

@luolanzone luolanzone commented Apr 7, 2022

  1. Reset common area's cluster manager so it can be started again
    when member cluster disconnects from leader and reconnects. Otherwise,
    it will raise an error can't accept new runnable as stop procedure is already engaged.

  2. Always update the ResourceImport cache for importer so it can handle
    deletion event correctly.

Fixes #3593

Signed-off-by: Lan Luo [email protected]

@luolanzone
Copy link
Contributor Author

/test-multicluster-e2e

@codecov-commenter
Copy link

codecov-commenter commented Apr 7, 2022

Codecov Report

Merging #3596 (814dff8) into main (03b3f2b) will decrease coverage by 10.45%.
The diff coverage is 16.66%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #3596       +/-   ##
===========================================
- Coverage   64.26%   53.80%   -10.46%     
===========================================
  Files         278      392      +114     
  Lines       27821    43110    +15289     
===========================================
+ Hits        17878    23196     +5318     
- Misses       8045    17613     +9568     
- Partials     1898     2301      +403     
Flag Coverage Δ
integration-tests 38.72% <ø> (?)
kind-e2e-tests 48.08% <ø> (-3.21%) ⬇️
unit-tests 43.44% <16.66%> (-0.08%) ⬇️

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

Impacted Files Coverage Δ
...trollers/multicluster/commonarea/leader_elector.go 82.05% <0.00%> (-4.80%) ⬇️
...lers/multicluster/commonarea/remote_common_area.go 22.52% <0.00%> (-1.04%) ⬇️
...lticluster/commonarea/resourceimport_controller.go 70.12% <100.00%> (-0.13%) ⬇️
...g/agent/apiserver/handlers/featuregates/handler.go 0.00% <0.00%> (-82.36%) ⬇️
pkg/controller/egress/store/egressgroup.go 1.38% <0.00%> (-55.56%) ⬇️
...kg/apiserver/registry/system/supportbundle/rest.go 20.45% <0.00%> (-54.55%) ⬇️
pkg/support/dump.go 8.19% <0.00%> (-49.19%) ⬇️
...egator/apiserver/handlers/recordmetrics/handler.go 0.00% <0.00%> (-44.45%) ⬇️
pkg/support/dump_others.go 0.00% <0.00%> (-44.00%) ⬇️
...g/agent/apiserver/handlers/addressgroup/handler.go 0.00% <0.00%> (-40.00%) ⬇️
... and 149 more

Copy link
Contributor

@jianjuns jianjuns left a comment

Choose a reason for hiding this comment

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

In the commit message:

when member cluster disconnect with leader and reconnect.

a member cluster disconnects from the leader and reconnects

1. Reset common area's cluster manager so it can be started again
when member cluster disconnects from leader and reconnects. Otherwise,
it will raise an error `can't accept new runnable as stop procedure is already engaged`

2. Always update the ResourceImport cache for importer so it can handle
   deletion event correctly.

Signed-off-by: Lan Luo <[email protected]>
@luolanzone luolanzone force-pushed the fix-disconnect-issue branch from 4368965 to 814dff8 Compare April 8, 2022 00:49
@luolanzone
Copy link
Contributor Author

In the commit message:

when member cluster disconnect with leader and reconnect.

a member cluster disconnects from the leader and reconnects

message is updated now. thanks.

@luolanzone luolanzone added the area/multi-cluster Issues or PRs related to multi cluster. label Apr 8, 2022
@tnqn tnqn added kind/bug Categorizes issue or PR as related to a bug. action/release-note Indicates a PR that should be included in release notes. labels Apr 12, 2022
@tnqn
Copy link
Member

tnqn commented Apr 12, 2022

/skip-all
/test-multicluster-e2e

@tnqn tnqn merged commit ecece42 into antrea-io:main Apr 12, 2022
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/multi-cluster Issues or PRs related to multi cluster. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MC importer doesn't work when leader controller is restarted
4 participants