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

ignore exporters when check data_dir overlap #1510

Merged
merged 1 commit into from
Aug 5, 2021

Conversation

AstroProfundis
Copy link
Contributor

What problem does this PR solve?

When user scale out new instance on a host where an imported instance already exist, and the global options set monitor paths to where the imported instance is located (and the log dir overlaps with data dir), the dir overlap check fails.

What is changed and how it works?

Ignore log dir overlapping if one of the compared dir is data dir of a monitor instance, as node_exporter and blackbox_exporter don't need data dir at all, the field is only kept for compatibility with tidb-ansible as the field was available there.

Check List

Tests

  • Unit test

Side effects

  • Increased code complexity

Related changes

  • Need to cherry-pick to the release branch

Release notes:

cluster: ignore exporters when check data_dir overlap

@AstroProfundis AstroProfundis added this to the v1.5.4 milestone Aug 5, 2021
@AstroProfundis AstroProfundis requested a review from lucklove August 5, 2021 04:03
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 5, 2021

[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 submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@AstroProfundis AstroProfundis self-assigned this Aug 5, 2021
@ti-chi-bot ti-chi-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 5, 2021
@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2021

Codecov Report

Merging #1510 (22370da) into master (ef79639) will increase coverage by 27.68%.
The diff coverage is 100.00%.

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

@@             Coverage Diff             @@
##           master    #1510       +/-   ##
===========================================
+ Coverage   26.17%   53.85%   +27.68%     
===========================================
  Files         267      292       +25     
  Lines       23939    26075     +2136     
===========================================
+ Hits         6265    14043     +7778     
+ Misses      16850    10079     -6771     
- Partials      824     1953     +1129     
Flag Coverage Δ
cluster 39.52% <0.00%> (?)
dm 26.40% <0.00%> (?)
integrate 48.27% <0.00%> (+32.15%) ⬆️
playground 13.79% <0.00%> (?)
tiup 16.11% <0.00%> (-0.01%) ⬇️
unittest 22.72% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
pkg/cluster/spec/validate.go 92.85% <100.00%> (+2.42%) ⬆️
pkg/logger/audit.go 57.89% <0.00%> (ø)
pkg/cluster/operation/telemetry.go 0.00% <0.00%> (ø)
components/playground/instance/tidb.go 83.78% <0.00%> (ø)
pkg/cluster/operation/destroy.go 49.24% <0.00%> (ø)
components/playground/instance/tikv_config.go 100.00% <0.00%> (ø)
components/playground/instance/drainer.go 0.00% <0.00%> (ø)
components/playground/instance/pump.go 0.00% <0.00%> (ø)
pkg/cluster/operation/check.go 48.58% <0.00%> (ø)
components/playground/instance/ticdc.go 0.00% <0.00%> (ø)
... and 208 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 ef79639...f5025db. Read the comment docs.

Copy link
Member

@lucklove lucklove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: f5025db

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 5, 2021
@ti-chi-bot ti-chi-bot merged commit 89ab706 into pingcap:master Aug 5, 2021
@AstroProfundis AstroProfundis deleted the fix-dir-check branch August 5, 2021 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 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