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

xds/internal/cdsbalancer: Fix race between processing of security configuration and creation of SubConns #6789

Closed
wants to merge 1 commit into from

Conversation

zasweq
Copy link
Contributor

@zasweq zasweq commented Nov 14, 2023

Fixes #6787.

RELEASE NOTES:

  • xds/internal/cdsbalancer: Fix race between processing of security configuration and creation of SubConns

@zasweq zasweq requested a review from dfawley November 14, 2023 00:42
@zasweq zasweq added this to the 1.60 Release milestone Nov 14, 2023
Copy link

codecov bot commented Nov 14, 2023

Codecov Report

Merging #6789 (e072275) into master (8645f95) will increase coverage by 0.16%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6789      +/-   ##
==========================================
+ Coverage   83.24%   83.41%   +0.16%     
==========================================
  Files         285      285              
  Lines       30950    30959       +9     
==========================================
+ Hits        25765    25825      +60     
+ Misses       4099     4056      -43     
+ Partials     1086     1078       -8     
Files Coverage Δ
xds/internal/balancer/cdsbalancer/cdsbalancer.go 80.64% <100.00%> (+0.40%) ⬆️

... and 14 files with indirect coverage changes

Copy link
Member

@dfawley dfawley left a comment

Choose a reason for hiding this comment

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

Looks like we store a pointer in the address's attributes, so this is still racy when the data is changed while the xdsHI is being read.

Note that the handshakeinfo itself has a lock when accessing its methods. Is that sufficient? I guess not given that the updates happen in 3 steps, but if we combined those into one operation, is that enough to fix everything?

@dfawley dfawley assigned zasweq and unassigned dfawley Nov 14, 2023
@arvindbr8 arvindbr8 modified the milestones: 1.60 Release, 1.61 Release Nov 14, 2023
@zasweq
Copy link
Contributor Author

zasweq commented Nov 15, 2023

Discussed offline to do atomic read/write to pointer so Conn can get new handshake info if reconnected, implemented in this PR: #6796.

@zasweq zasweq closed this Nov 15, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Security configuration needs to be per cluster, not from the top level cluster
3 participants