cluster/import: read and set deploy_dir properly on import#704
Merged
lonng merged 2 commits intopingcap:masterfrom Aug 24, 2020
Merged
cluster/import: read and set deploy_dir properly on import#704lonng merged 2 commits intopingcap:masterfrom
lonng merged 2 commits intopingcap:masterfrom
Conversation
lonng
reviewed
Aug 21, 2020
| `) | ||
|
|
||
| topo, err := yaml.Marshal(clsMeta.Topology) | ||
| fmt.Printf("Got initial topo:\n%s\n", topo) |
Contributor
Author
There was a problem hiding this comment.
Yes, it won't output anything if the test passes.
lonng
reviewed
Aug 21, 2020
lonng
reviewed
Aug 21, 2020
| // subdirs of deploy_dir in global options | ||
| clsMeta.Topology.MonitoredOptions.DeployDir = clsMeta.Topology.GlobalOptions.DeployDir | ||
| clsMeta.Topology.MonitoredOptions.DataDir = filepath.Join( | ||
| clsMeta.Topology.MonitoredOptions.DeployDir, |
Contributor
There was a problem hiding this comment.
Is there risk is the user doesn't set the global deploy_dir?
Contributor
Author
There was a problem hiding this comment.
It's not possible for tidb-ansible, in that case the deploy process could not be finished.
Codecov Report
@@ Coverage Diff @@
## master #704 +/- ##
==========================================
+ Coverage 57.64% 57.65% +0.01%
==========================================
Files 254 254
Lines 18433 18447 +14
==========================================
+ Hits 10626 10636 +10
- Misses 6410 6412 +2
- Partials 1397 1399 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
c65df41 to
20fdc0d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
The global
deploy_diris not set during the process of importing from ansible deployed cluster, however, as we detect and set deploy dir for each instance individually, this only affect monitoring agents (node_exporter and blackbox_exporter).What is changed and how it works?
Read the value of
deploy_dirininventory.iniand set it toglobal.deploy_dirandmonitored.deploy_dirglobal variables.Note that as we read and set dirs for each instance individually, this change does not effect them.
Check List
Tests
Code changes
Side effects
None
Related changes
Release notes: