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

cluster,dm: add support of ssh-proxy #1438

Merged
merged 25 commits into from
Jun 29, 2021

Conversation

9547
Copy link
Contributor

@9547 9547 commented Jun 21, 2021

What problem does this PR solve?

Try to implement #1417

What is changed and how it works?

This PR contains 3 proxy:

  1. Pure SSH Proxy via easyssh or the built-in ssh client: used by many actions, such as check, deploy, display, exec...
  2. HTTP over SSH Proxy: used by PdAPI, DMAPi, such as fetch the component's status
  3. TCP over SSH Proxy: used by etcd grpc, such as UpdateTopology

You can enable this feature with the --ssh-proxy-host parameter,at the same time, we also provide some other --ssh-proxy-xxx parameters.

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

@9547 9547 marked this pull request as draft June 21, 2021 12:41
@ti-chi-bot ti-chi-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 21, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jun 21, 2021

Codecov Report

Merging #1438 (15d36d5) into master (56496c3) will increase coverage by 8.35%.
The diff coverage is 34.60%.

❗ Current head 15d36d5 differs from pull request most recent head 31feae6. Consider uploading reports for the commit 31feae6 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1438      +/-   ##
==========================================
+ Coverage   25.11%   33.46%   +8.35%     
==========================================
  Files         264      228      -36     
  Lines       20903    18573    -2330     
==========================================
+ Hits         5249     6216     +967     
+ Misses      14850    11262    -3588     
- Partials      804     1095     +291     
Flag Coverage Δ
cluster 33.46% <34.60%> (?)
integrate 33.46% <34.60%> (+18.09%) ⬆️
tiup ?
unittest ?

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

Impacted Files Coverage Δ
components/cluster/command/import.go 17.24% <0.00%> (ø)
pkg/cluster/ansible/config.go 0.00% <0.00%> (ø)
pkg/cluster/executor/ssh.go 25.60% <0.00%> (+16.90%) ⬆️
pkg/cluster/manager/scale_in.go 0.00% <0.00%> (ø)
pkg/cluster/manager/scale_out.go 0.00% <0.00%> (-8.43%) ⬇️
pkg/cluster/manager/upgrade.go 0.00% <0.00%> (-5.60%) ⬇️
pkg/cluster/operation/operation.go 69.56% <ø> (ø)
pkg/cluster/operation/scale_in.go 0.00% <0.00%> (ø)
pkg/cluster/spec/spec.go 66.56% <0.00%> (+14.09%) ⬆️
pkg/cluster/spec/tikv.go 24.75% <0.00%> (+8.42%) ⬆️
... and 268 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 56496c3...31feae6. Read the comment docs.

@9547 9547 force-pushed the feature/ssh-proxy branch from b91cd57 to 15d36d5 Compare June 23, 2021 15:55
@9547 9547 marked this pull request as ready for review June 23, 2021 15:55
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 23, 2021
@9547 9547 changed the title [DNM] cluster,dm: add support of ssh-proxy cluster,dm: add support of ssh-proxy Jun 23, 2021
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 24, 2021
@9547 9547 force-pushed the feature/ssh-proxy branch from 15d36d5 to 31feae6 Compare June 24, 2021 22:04
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 24, 2021
@9547
Copy link
Contributor Author

9547 commented Jun 28, 2021

/cc @AstroProfundis

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

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

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 29, 2021
@AstroProfundis AstroProfundis added this to the v1.6.0 milestone Jun 29, 2021
@ti-chi-bot ti-chi-bot merged commit ba53f34 into pingcap:master Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XXL Denotes a PR that changes 1000+ 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.

5 participants