-
Notifications
You must be signed in to change notification settings - Fork 312
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
cluster: add significant warning when --force
is set for scale-in
#1629
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Codecov Report
@@ Coverage Diff @@
## master #1629 +/- ##
===========================================
+ Coverage 15.60% 44.21% +28.61%
===========================================
Files 151 292 +141
Lines 15225 26734 +11509
===========================================
+ Hits 2376 11821 +9445
- Misses 12332 13043 +711
- Partials 517 1870 +1353
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 7ef1087
|
What problem does this PR solve?
The argument
--force
for commandscale-in
is unsafe and ignores errors, it should only be used when the target node is already offline and impossible to connect.However, some users might try to use
scale-in --force
to delete TiKV instances if it is stuck inPending Offline
status, and thus lead to broken region or data loss.Close #1630
What is changed and how it works?
Add a significant warning sign in ASCII art to get the user fully aware, and require the user to type in "Yes, I know my data might be lost." instead of simply
y/n
to confirm the operation.Also add a specific note that
scale-in --force
should not be used if there are any "Pending Offline" instances.Check List
Tests
Code changes
Related changes
Release notes: