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

Fixes waiting for level-driven informers to stop #4383

Merged
merged 1 commit into from
May 23, 2024

Conversation

trozet
Copy link
Contributor

@trozet trozet commented May 22, 2024

We were not waiting on for informers to fully shutdown for level-driven controllers. As a consequence, goroutines would still be running handling events while the next unit test case ran. In this case, a handler with no workqueue (like node_tracker) would attempt to read global config, while the next test case was modifying the global config, leading to a data race.

Fixes: #4381

Thanks to @npinaeva for helping me debug this one!

@trozet trozet requested a review from a team as a code owner May 22, 2024 19:11
@trozet trozet requested a review from jcaamano May 22, 2024 19:11
@tssurya tssurya added the kind/bug All issues that are bugs and PRs opened to fix bugs label May 22, 2024
@tssurya tssurya added this to the v1.0.0 milestone May 22, 2024
@coveralls
Copy link

Coverage Status

coverage: 52.593% (+0.01%) from 52.581%
when pulling d9414e6 on trozet:fix_informer_race
into 88b05ef on ovn-org:master.

@trozet trozet force-pushed the fix_informer_race branch 2 times, most recently from 4c1bc4c to 3a68983 Compare May 23, 2024 14:03
We were not waiting on for informers to fully shutdown for level-driven
controllers. As a consequence, goroutines would still be running
handling events while the next unit test case ran. In this case, a
handler with no workqueue (like node_tracker) would attempt to read
global config, while the next test case was modifying the global config,
leading to a data race.

Fixes: ovn-org#4381

Signed-off-by: Tim Rozet <[email protected]>
@trozet trozet merged commit 49e1aea into ovn-org:master May 23, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug All issues that are bugs and PRs opened to fix bugs
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

unit tests Data race with level-driven informers not waiting for shut down
4 participants