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

Fix the dir check logic on imported cluster #1273

Merged
merged 5 commits into from
Apr 7, 2021

Conversation

lucklove
Copy link
Member

@lucklove lucklove commented Apr 1, 2021

What problem does this PR solve?

When scaling cluster, tiup will check if there are directories that overlaps each other to avoid conflict. The directories include both imported an new deployed ones.

However, the components deployed by ansible will use the same directory for saving log, which is by designed. At this time, TiUP will report an error if the imported cluster share the same host with different components when you try to scale the cluster.

What is changed and how it works?

If the directories conflict are both imported, skip instead of report an error.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release notes:

NONE

@lucklove lucklove added this to the v1.4.1 milestone Apr 1, 2021
@ti-chi-bot ti-chi-bot requested a review from nrc April 1, 2021 10:59
@ti-chi-bot ti-chi-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 1, 2021
@codecov-io
Copy link

codecov-io commented Apr 1, 2021

Codecov Report

Merging #1273 (3d94ad4) into master (52e24c2) will increase coverage by 23.91%.
The diff coverage is 72.72%.

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

@@             Coverage Diff             @@
##           master    #1273       +/-   ##
===========================================
+ Coverage   26.17%   50.09%   +23.91%     
===========================================
  Files         263      289       +26     
  Lines       18915    20875     +1960     
===========================================
+ Hits         4951    10457     +5506     
+ Misses      13194     8737     -4457     
- Partials      770     1681      +911     
Flag Coverage Δ
cluster 38.52% <0.00%> (?)
dm 26.58% <0.00%> (?)
integrate 44.05% <0.00%> (+27.68%) ⬆️
playground 3.10% <ø> (?)
tiup 16.36% <0.00%> (-0.01%) ⬇️
unittest 22.75% <72.72%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
pkg/cluster/manager/deploy.go 65.84% <0.00%> (+65.84%) ⬆️
pkg/cluster/spec/validate.go 93.15% <0.00%> (+1.99%) ⬆️
components/dm/ansible/import.go 63.27% <100.00%> (+0.57%) ⬆️
pkg/cluster/spec/prometheus.go 77.32% <100.00%> (+60.46%) ⬆️
pkg/cluster/operation/check.go 47.76% <0.00%> (ø)
pkg/cluster/operation/download.go 36.84% <0.00%> (ø)
components/playground/instance/instance.go 0.00% <0.00%> (ø)
components/playground/instance/pump.go 0.00% <0.00%> (ø)
components/playground/instance/tikv_config.go 0.00% <0.00%> (ø)
components/playground/instance/process.go 0.00% <0.00%> (ø)
... and 199 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 ea6e194...a126f21. Read the comment docs.

@AstroProfundis
Copy link
Contributor

AstroProfundis commented Apr 3, 2021

This seems related to #1266, we could also test if this fixes it.

@pingcap pingcap deleted a comment from ti-chi-bot Apr 6, 2021
@ti-chi-bot ti-chi-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 6, 2021
@ti-chi-bot
Copy link
Member

[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 writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

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

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 7, 2021
@ti-chi-bot
Copy link
Member

@lucklove: Your PR was out of date, I have automatically updated it for you.

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.

@ti-chi-bot ti-chi-bot merged commit 41a499c into pingcap:master Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 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