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 issue with loadbalancer failover to default server #11319

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

brandond
Copy link
Member

@brandond brandond commented Nov 14, 2024

Proposed Changes

The loadbalancer should only fail over to the default server if all other server have failed, and it should force fail-back to a preferred server as soon as one passes health checks.

The loadbalancer tests have been improved to ensure that this occurs.

Types of Changes

bugfix

Verification

See linked issue

Testing

yes

Linked Issues

User-Facing Change


Further Comments

The loadbalancer should only fail over to the default server if all other server have failed, and it should force fail-back to a preferred server as soon as one passes health checks.

The loadbalancer tests have been improved to ensure that this occurs.

Signed-off-by: Brad Davidson <[email protected]>
@brandond brandond requested a review from a team as a code owner November 14, 2024 02:13
Copy link

codecov bot commented Nov 14, 2024

Codecov Report

Attention: Patch coverage is 73.91304% with 6 lines in your changes missing coverage. Please review.

Project coverage is 13.82%. Comparing base (71fdc4a) to head (3fb8207).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
pkg/agent/loadbalancer/servers.go 78.94% 4 Missing ⚠️
pkg/util/apierrors.go 0.00% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (71fdc4a) and HEAD (3fb8207). Click for more details.

HEAD has 18 uploads less than BASE
Flag BASE (71fdc4a) HEAD (3fb8207)
inttests 11 0
e2etests 7 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #11319       +/-   ##
===========================================
- Coverage   46.87%   13.82%   -33.05%     
===========================================
  Files         179      176        -3     
  Lines       18587    18526       -61     
===========================================
- Hits         8712     2562     -6150     
- Misses       8516    15665     +7149     
+ Partials     1359      299     -1060     
Flag Coverage Δ
e2etests ?
inttests ?
unittests 13.82% <73.91%> (+0.17%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@brandond brandond merged commit cd4dded into k3s-io:master Nov 14, 2024
30 checks passed
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.

3 participants