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

cluster: prohibit the clean operations during scale-out #1642

Conversation

srstack
Copy link
Collaborator

@srstack srstack commented Nov 29, 2021

What problem does this PR solve?

prohibit the clean operations during scale-out

Because the clean operation will stop the cluster, if the cluster is stopped while the scale-out is not completed, the scale-out will be abnormal.

What is changed and how it works?

Will check the scale-out file lock before clean

Check List

Tests

  • Manual test (add detailed scripts or steps below)
./tiup-cluster scale-out <cluster-name>  scale-out.yaml --stage1
./tiup-cluster clean <cluster-name> --all
Error: Scale-out file lock already exists (spec.scale-out lock)

Verbose debug logs has been written to /home/tidb/.tiup/logs/tiup-cluster-debug-2021-11-29-12-06-08.log.

Please run 'tiup-cluster scale-out --stage2' to continue.

Code changes

  • Has exported variable/fields change

Side effects

  • Possible performance regression

Related changes

  • Need to cherry-pick to the release branch

Release notes:

NONE

@srstack srstack added this to the v1.8.0 milestone Nov 29, 2021
@srstack srstack self-assigned this Nov 29, 2021
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Nov 29, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • AstroProfundis

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 29, 2021
@codecov-commenter
Copy link

codecov-commenter commented Nov 29, 2021

Codecov Report

Merging #1642 (9277508) into master (9edf64e) will increase coverage by 34.87%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1642       +/-   ##
===========================================
+ Coverage   15.55%   50.42%   +34.87%     
===========================================
  Files         151      294      +143     
  Lines       15275    26914    +11639     
===========================================
+ Hits         2376    13572    +11196     
+ Misses      12382    11275     -1107     
- Partials      517     2067     +1550     
Flag Coverage Δ
cluster 43.67% <0.00%> (?)
dm 26.08% <0.00%> (?)
integrate 50.42% <0.00%> (+34.87%) ⬆️
playground 13.31% <ø> (?)
tiup 15.55% <ø> (ø)
unittest ∅ <ø> (∅)

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

Impacted Files Coverage Δ
pkg/cluster/manager/cleanup.go 46.83% <0.00%> (ø)
pkg/cluster/operation/destroy.go 59.42% <0.00%> (ø)
pkg/cluster/task/limits.go 70.00% <0.00%> (ø)
components/dm/main.go 100.00% <0.00%> (ø)
components/playground/instance/pd.go 75.00% <0.00%> (ø)
pkg/cluster/task/env_init.go 58.97% <0.00%> (ø)
components/dm/command/display.go 66.66% <0.00%> (ø)
pkg/cluster/ansible/import.go 0.00% <0.00%> (ø)
components/cluster/command/telemetry.go 24.00% <0.00%> (ø)
pkg/cluster/manager/deploy.go 72.44% <0.00%> (ø)
... and 237 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9edf64e...9277508. Read the comment docs.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 30, 2021
@AstroProfundis
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 9277508

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 30, 2021
@ti-chi-bot ti-chi-bot merged commit 2dba6d7 into pingcap:master Nov 30, 2021
@AstroProfundis AstroProfundis modified the milestones: v1.9.0, v1.8.0 Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants