vip, config: avoid multiple VIP owners exist at the same time#1118
vip, config: avoid multiple VIP owners exist at the same time#1118djshow832 wants to merge 12 commits intopingcap:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1118 +/- ##
=======================================
Coverage ? 67.19%
=======================================
Files ? 144
Lines ? 15176
Branches ? 0
=======================================
Hits ? 10197
Misses ? 4288
Partials ? 691
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4bfefbfbf2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| vm.stopARPRefresh() | ||
| vm.delVIP() |
There was a problem hiding this comment.
Remove VIP before waiting for refresh worker
OnRetired waits for stopARPRefresh() before deleting the VIP. If the refresh goroutine is inside SendARP() (e.g. slow arping, non-zero burst interval, or command stall), retirement blocks while the VIP remains configured. The new owner can already acquire and bind the VIP once etcd ownership advances, so this ordering reintroduces a simultaneous-owner window that can repopulate upstream ARP caches with the old MAC.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
It will always cause the multi-vip problem if we only delete vip in onRetired(). However, the vip is also deleted before closing the election.
What problem does this PR solve?
Issue Number: close #1117
Problem Summary:
When the client and the cluster are in different network segments, the client may fail to connect to the VIP after a VIP switch happens:
What is changed and how it works:
Note:
Check List
Tests
Notable changes
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.