-
Notifications
You must be signed in to change notification settings - Fork 499
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
retry evict leader when upgrading TiKV if needed #5613
Conversation
/run-all-tests |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5613 +/- ##
===========================================
- Coverage 61.49% 24.37% -37.12%
===========================================
Files 235 219 -16
Lines 30337 30208 -129
===========================================
- Hits 18655 7364 -11291
- Misses 9813 21818 +12005
+ Partials 1869 1026 -843
|
/run-pull-e2e-kind-across-kubernetes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@ideascf: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ideascf The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/run-pull-e2e-kind-across-kubernetes |
/cherry-pick release-1.5 |
@csuzhangxc: new pull request created to branch In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
What problem does this PR solve?
close #5614
In some cases when upgrading TiKV, the evict-leader-scheduler may not be added or missing in PD, but the
evictLeaderBeginTime
annotation of the TiKV pod is added. As TiDB Operator will not call PD API to add evict-leader-scheduler again, then the upgrade operation is blocked.In this PR, we check whether the evict-leader-scheduler exists if a timeout (10m) is reached, and try to add evict-leader-again if it's missing.
What is changed and how does it work?
Code changes
Tests
controller.GetPDClient(u.deps.PDControl, tc).BeginEvictLeader(storeID)
call inbeginEvictLeader
wait for evictition to complete
), and check theevictLeaderBeginTime
annotation existingevictLeaderBeginTime
is updated to the new timeSide effects
Related changes
Release Notes
Please refer to Release Notes Language Style Guide before writing the release note.