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

Feature/disable log or data dir overlapped #1093

Merged
merged 6 commits into from
Jan 25, 2021

Conversation

9547
Copy link
Contributor

@9547 9547 commented Jan 23, 2021

What problem does this PR solve?

Fix #1047

What is changed and how it works?

Check List

Tests

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

Manual test as below:

cat << EOF > topo.yml
global:
  user: tidb6wu
  group: pingcap
  deploy_dir: tidb1-deploy
  data_dir: tidb1-data

server_configs:
  tidb:
    binlog.enable: true
    binlog.ignore-error: false
  tikv:
    storage.reserve-space: 1K
  pump:
    storage.stop-write-at-available-space: 1 mib

pd_servers:
  - host: n3
  - host: n4
  - host: n5

tikv_servers:
  - host: n1
    port: 32160
    status_port: 32180
    log_dir: '/home/tidb6wu/tidb1-data/tikv-32160/log'
    data_dir: '/home/tidb6wu/tidb1-data/tikv-32160'
  - host: n2
  - host: n3
  EOF

tiup-cluster deploy c1 v4.0.4 topo.yml

The check will failed of overlapError

image

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

@ti-chi-bot ti-chi-bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 23, 2021
@9547
Copy link
Contributor Author

9547 commented Jan 23, 2021

/cc @lucklove

@codecov-io
Copy link

codecov-io commented Jan 23, 2021

Codecov Report

Merging #1093 (2f4bdc0) into master (8fb48a6) will increase coverage by 35.20%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1093       +/-   ##
===========================================
+ Coverage   21.41%   56.61%   +35.20%     
===========================================
  Files         165      283      +118     
  Lines       12713    20013     +7300     
===========================================
+ Hits         2722    11330     +8608     
+ Misses       9387     6931     -2456     
- Partials      604     1752     +1148     
Flag Coverage Δ
cluster 45.06% <52.72%> (?)
dm 24.84% <47.27%> (?)
integrate 51.01% <52.72%> (+29.60%) ⬆️
playground 20.89% <0.00%> (-0.03%) ⬇️
tiup 16.37% <0.00%> (+<0.01%) ⬆️
unittest 22.81% <100.00%> (?)

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

Impacted Files Coverage Δ
pkg/utils/mock/mock.go 8.00% <ø> (ø)
pkg/cluster/spec/validate.go 93.50% <100.00%> (+93.50%) ⬆️
pkg/utils/ioutil.go 59.32% <100.00%> (+16.07%) ⬆️
pkg/cluster/manager/deploy.go 70.35% <0.00%> (ø)
pkg/cluster/task/mkdir.go 57.14% <0.00%> (ø)
pkg/cluster/manager/upgrade.go 63.47% <0.00%> (ø)
components/dm/command/upgrade.go 71.42% <0.00%> (ø)
components/dm/command/start.go 80.00% <0.00%> (ø)
components/cluster/command/prune.go 75.00% <0.00%> (ø)
components/cluster/command/import.go 17.64% <0.00%> (ø)
... and 214 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 8fb48a6...defadd0. Read the comment docs.

@lucklove
Copy link
Member

/lgtm

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lucklove

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 Jan 25, 2021
@lucklove
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 2f4bdc0

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

@9547: Your PR has out-of-dated, 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 8dfd3fa into pingcap:master Jan 25, 2021
mianhk pushed a commit to mianhk/tiup that referenced this pull request Jan 29, 2021
* feat(cluster/spec): implement the validate of dir overlap

* feat(utils): add IsSubDir helper function

* feat(cluster/spec): add overlap test cases

* typo(cluster/spec): add struct comment

* typo(*): chmod a-x

Co-authored-by: Ti Chi Robot <[email protected]>
@9547 9547 deleted the feature/disable-log-under-data branch April 6, 2021 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XL Denotes a PR that changes 500-999 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
4 participants