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: check, deploy support use ssh-agent instead of identity-file #1416

Merged
merged 7 commits into from
Jun 11, 2021

Conversation

9547
Copy link
Contributor

@9547 9547 commented Jun 8, 2021

What problem does this PR solve?

implement #1393

What is changed and how it works?

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

@ti-chi-bot ti-chi-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 8, 2021
@9547
Copy link
Contributor Author

9547 commented Jun 8, 2021

/run-all-tests

@AstroProfundis AstroProfundis added component/cluster Issues about the tiup-cluster component component/dm Issues about the tiup-dm component type/new-feature Categorizes pr as related to a new feature. labels Jun 9, 2021
@AstroProfundis AstroProfundis added this to the v1.6.0 milestone Jun 9, 2021
@9547 9547 force-pushed the feature/support-ssh-agent branch from c2e6821 to 130d991 Compare June 10, 2021 00:11
@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2021

Codecov Report

Merging #1416 (547f5b9) into master (befddd5) will decrease coverage by 1.27%.
The diff coverage is 19.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1416      +/-   ##
==========================================
- Coverage   25.32%   24.04%   -1.28%     
==========================================
  Files         266      226      -40     
  Lines       20625    18434    -2191     
==========================================
- Hits         5223     4433     -790     
+ Misses      14599    13169    -1430     
- Partials      803      832      +29     
Flag Coverage Δ
dm 24.04% <19.44%> (?)
integrate 24.04% <19.44%> (+8.56%) ⬆️
tiup ?
unittest ?

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

Impacted Files Coverage Δ
components/dm/command/deploy.go 64.70% <ø> (+25.81%) ⬆️
components/dm/command/scale_out.go 87.50% <ø> (+37.50%) ⬆️
pkg/cluster/manager/check.go 0.00% <ø> (ø)
pkg/cliutil/ssh.go 15.55% <19.44%> (+15.55%) ⬆️
pkg/utils/regexp.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/repository/store/store.go 0.00% <0.00%> (-100.00%) ⬇️
components/dm/ansible/worker.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/repository/utils/hash.go 0.00% <0.00%> (-81.82%) ⬇️
pkg/utils/semver.go 3.47% <0.00%> (-81.74%) ⬇️
pkg/meta/err.go 0.00% <0.00%> (-81.25%) ⬇️
... and 226 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 befddd5...547f5b9. Read the comment docs.

@9547
Copy link
Contributor Author

9547 commented Jun 10, 2021

@AstroProfundis PTAL

pkg/cliutil/ssh.go Outdated Show resolved Hide resolved
IdentityFile: identityFilePath,
IdentityFilePassphrase: passphrase,
}, nil
return &SSHConnectionProps{}, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is sshAuthSock used in this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SSH_AUTH_SOCK will be used in https://github.com/appleboy/easyssh-proxy/blob/master/easyssh.go#L147-L149, our previous code just checks this socket file exists and valid.

@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 11, 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: 547f5b9

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 11, 2021
@ti-chi-bot ti-chi-bot merged commit ffa74b5 into pingcap:master Jun 11, 2021
@jsvisa jsvisa deleted the feature/support-ssh-agent branch October 19, 2022 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/cluster Issues about the tiup-cluster component component/dm Issues about the tiup-dm component size/L Denotes a PR that changes 100-499 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. type/new-feature Categorizes pr as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants