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 race condition caused by etcd advertising addresses that it does not listen on #7147

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

brandond
Copy link
Contributor

@brandond brandond commented Mar 24, 2023

Proposed Changes

Fix race condition caused by etcd advertising addresses that it does not listen on, by ensuring that loopback is used for the advertised address when resetting.

This was highly unlikely to occur on k3s where etcd starts quickly due to running in the main process, but did affect rke2 where the etcd static pod can be slow to start.

Types of Changes

bugfix

Verification

  • Check etcd logs during --cluster-reset; confirm that only loopback addresses are listened on and advertised
  • Check etcd logs during normal operation; confirm that node local IP is listened on and advertised

Testing

Linked Issues

User-Facing Change

Fixed a race condition during cluster reset that could cause the operation to hang and time out.

Further Comments

@brandond brandond requested a review from a team as a code owner March 24, 2023 22:25
@brandond brandond marked this pull request as draft March 24, 2023 22:53
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
@brandond brandond force-pushed the fix_reset_advertised_address branch from b117922 to be57c4e Compare March 24, 2023 23:03
@brandond brandond marked this pull request as ready for review March 24, 2023 23:18
@codecov-commenter
Copy link

codecov-commenter commented Mar 24, 2023

Codecov Report

Patch coverage: 42.85% and project coverage change: +0.02 🎉

Comparison is base (b7f90f3) 9.64% compared to head (be57c4e) 9.66%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #7147      +/-   ##
=========================================
+ Coverage    9.64%   9.66%   +0.02%     
=========================================
  Files         146     147       +1     
  Lines       10752   10769      +17     
=========================================
+ Hits         1037    1041       +4     
- Misses       9497    9509      +12     
- Partials      218     219       +1     
Flag Coverage Δ
unittests 9.66% <42.85%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
pkg/etcd/etcd.go 14.54% <42.85%> (+0.05%) ⬆️

... and 8 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@brandond brandond merged commit b010db0 into k3s-io:master Apr 4, 2023
@brandond brandond deleted the fix_reset_advertised_address branch June 6, 2024 21:18
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.

4 participants