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: check support check before scale-out the instance #1659

Merged
merged 17 commits into from
Dec 30, 2021

Conversation

srstack
Copy link
Collaborator

@srstack srstack commented Dec 9, 2021

What problem does this PR solve?

close #1621

What is changed and how it works?

  1. check should support check with the scale-out topology file
tiup cluster check cluster-name  scale-out.yml  --cluster 
  1. Increase the detection of the existence of deployment directories, daily directories, data directories and systemdUnit file to prevent conflicts in tidb clusters deployed in different ways
    image
  2. Added prompts for scale-out operations
    image

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Code changes

  • Has exported function/method change

Side effects

  • Increased code complexity

Related changes

  • Need to update the documentation

Release notes:

NONE

@srstack srstack self-assigned this Dec 9, 2021
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Dec 9, 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 9, 2021
@codecov-commenter
Copy link

codecov-commenter commented Dec 9, 2021

Codecov Report

Merging #1659 (beaebf2) into master (13b33c0) will increase coverage by 22.24%.
The diff coverage is 6.82%.

❗ Current head beaebf2 differs from pull request most recent head d88ea75. Consider uploading reports for the commit d88ea75 to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1659       +/-   ##
===========================================
+ Coverage   24.50%   46.74%   +22.24%     
===========================================
  Files         277      303       +26     
  Lines       31291    34189     +2898     
===========================================
+ Hits         7667    15980     +8313     
+ Misses      22776    16337     -6439     
- Partials      848     1872     +1024     
Flag Coverage Δ
cluster 32.66% <6.82%> (?)
dm 23.20% <3.36%> (?)
playground 12.76% <ø> (?)
tiup 14.62% <ø> (ø)
unittest 21.33% <4.50%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
pkg/cluster/manager/scale_out.go 41.71% <0.00%> (+36.37%) ⬆️
pkg/cluster/operation/check.go 0.00% <0.00%> (ø)
pkg/cluster/task/check.go 0.00% <0.00%> (ø)
pkg/cluster/manager/check.go 0.74% <4.40%> (+0.74%) ⬆️
components/cluster/command/check.go 66.67% <38.46%> (-10.48%) ⬇️
components/dm/task/update_dm_meta.go 87.76% <0.00%> (ø)
pkg/cluster/operation/scale_in.go 50.00% <0.00%> (ø)
components/playground/instance/tiflash.go 55.56% <0.00%> (ø)
... and 190 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 13b33c0...d88ea75. Read the comment docs.

@srstack srstack changed the title cluster: check should support check before expanding the instance cluster: check support check before expanding the instance Dec 10, 2021
@AstroProfundis AstroProfundis added this to the v1.9.0 milestone Dec 15, 2021
@AstroProfundis AstroProfundis changed the title cluster: check support check before expanding the instance cluster: check support check before scale-out the instance Dec 15, 2021
@AstroProfundis
Copy link
Contributor

Should use RootSSH instead of UserSSH for pre-scale-out checks, as those host may have no deploy user created.

@srstack
Copy link
Collaborator Author

srstack commented Dec 24, 2021

Should use RootSSH instead of UserSSH for pre-scale-out checks, as those host may have no deploy user created.

When checking an existing cluster, the ssh user will be forcibly set to metadata.User, which makes it impossible to log in with the root.
Now special treatment has been done for scale-out topology.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 29, 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: d88ea75

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 29, 2021
@ti-chi-bot ti-chi-bot merged commit 45c5017 into pingcap:master Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 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.

Tiup cluster check should support check before expanding the instance
4 participants