-
Notifications
You must be signed in to change notification settings - Fork 288
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
dm: openapi support multi TLS security config for downstream db and cluster #11844
Merged
Merged
Changes from 64 commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
39eafe7
generate api client and server
River2000i 5c1f5a0
use different tls config
River2000i ef1e4fb
add ca2 tls key
River2000i cf6e633
Merge branch 'master' of github.com:pingcap/tiflow into dmMultiSecuri…
River2000i c2974c3
add comment and fix
River2000i cd45903
add test
River2000i 17331f5
add ut
River2000i ee0bd4c
add ut
River2000i c853e28
add test
River2000i 52d71ff
fix test
River2000i 729d265
fix test
River2000i 6a00b34
fix test
River2000i d1c5ea1
add test
River2000i dcdac1e
fix certificates
River2000i bf1992d
add test
River2000i 47b2015
add test
River2000i 64de0cf
fix test
River2000i 5df2307
fix test
River2000i ec1b94f
fmt
River2000i c8aea05
fix test
River2000i 0650f6b
fix test
River2000i 3526f10
support set ssl by file path
River2000i 60df0b1
Merge remote-tracking branch 'upstream/master' into dmMultiSecurityCo…
River2000i 645b726
fmt
River2000i f87a110
fmt
River2000i edf188f
fix test
River2000i 9bfeac3
fix test
River2000i fb654e8
fix test
River2000i 7e92d40
fix test
River2000i c04aeb9
revert
River2000i a2b0494
fmt
River2000i 33b326c
fix test
River2000i eb1a609
fix test
River2000i faf557d
fix test
River2000i 60ff231
fix test
River2000i 2ecd31b
fix test
River2000i bb77e93
fix test
River2000i 85acc9b
fix test
River2000i 9298b97
fmt
River2000i 2389c33
fix test
River2000i b7225d8
fmt
River2000i 96414d9
use tls content
River2000i 008383a
write certificate files
River2000i fa8fb73
add comment
River2000i 0d1814a
fix test
River2000i 8eb2320
fmt
River2000i f97959d
fix test
River2000i 5863835
fix test
River2000i 6dc9d5f
fix test
River2000i 1e887f8
fix
River2000i 038f1fc
fix
River2000i bddf2dc
fix
River2000i 08b7aa1
Merge remote-tracking branch 'upstream/master' into dmMultiSecurityCo…
River2000i 0c17c5c
fix
River2000i b4d92f0
add test
River2000i 7a3e139
fmt
River2000i 5ea962e
add test
River2000i 040e37b
fmt
River2000i 8633039
fix comment
River2000i 7bdc7c2
fix checker only with `LightningTableEmptyChecking`
River2000i 829236d
fix
River2000i ca5fc73
fix test
River2000i eec9953
fix test
River2000i a60f5bf
fix test
River2000i 34abf84
update comment
River2000i 7f73a41
update test use github.com/stretchr/testify/require
River2000i a6a72c1
Merge branch 'dmMultiSecurityConfig' of github.com:River2000i/tiflow …
River2000i File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ import ( | |
"github.com/pingcap/tidb/pkg/util/filter" | ||
router "github.com/pingcap/tidb/pkg/util/table-router" | ||
"github.com/pingcap/tiflow/dm/config/dbconfig" | ||
"github.com/pingcap/tiflow/dm/config/security" | ||
"github.com/pingcap/tiflow/dm/pkg/log" | ||
"github.com/pingcap/tiflow/dm/pkg/terror" | ||
"github.com/pingcap/tiflow/dm/pkg/utils" | ||
|
@@ -301,6 +302,9 @@ type LoaderConfig struct { | |
RangeConcurrency int `yaml:"range-concurrency" toml:"range-concurrency" json:"range-concurrency"` | ||
CompressKVPairs string `yaml:"compress-kv-pairs" toml:"compress-kv-pairs" json:"compress-kv-pairs"` | ||
PDAddr string `yaml:"pd-addr" toml:"pd-addr" json:"pd-addr"` | ||
// now only creating task by OpenAPI will use the `Security` field to connect PD. | ||
// TODO: support setting `Security` by dmctl | ||
Security *security.Security `yaml:"-" toml:"security" json:"security"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not support yaml format since it will block few engine test, also we not support set the filed by yaml. |
||
} | ||
|
||
// DefaultLoaderConfig return default loader config for task. | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove this check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix this issue #11945. Root cause is this check will set pd addr to
noop:2379
. In fact, when we run checker byRunCheckOnConfigs()
https://github.com/pingcap/tiflow/blob/master/dm/checker/cmd.go#L113, it will initial all checker and remove few ignored checkers https://github.com/pingcap/tiflow/blob/master/dm/checker/cmd.go#L49. But the rest checker do not ignored, will use pdClient to get some info.