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: support init root password #1700

Merged
merged 7 commits into from
Dec 29, 2021

Conversation

AstroProfundis
Copy link
Contributor

What problem does this PR solve?

Close #1660

What is changed and how it works?

An --init argument is added to tiup-cluster start subcommand, it generates a 18 chars long random password and set it to the root@'%' user.

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Related changes

  • Need to update the documentation

Release notes:

NONE

@AstroProfundis AstroProfundis self-assigned this Dec 29, 2021
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Dec 29, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • nexustar

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 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 29, 2021
@nexustar
Copy link
Collaborator

Is it available for TLS-enabled cluster?

@codecov-commenter
Copy link

codecov-commenter commented Dec 29, 2021

Codecov Report

Merging #1700 (3e9e141) into master (26e5521) will increase coverage by 5.86%.
The diff coverage is 36.59%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1700      +/-   ##
==========================================
+ Coverage   47.33%   53.19%   +5.86%     
==========================================
  Files         301      303       +2     
  Lines       34011    34096      +85     
==========================================
+ Hits        16098    18135    +2037     
+ Misses      15797    13827    -1970     
- Partials     2116     2134      +18     
Flag Coverage Δ
cluster 41.39% <18.29%> (+0.55%) ⬆️
dm 24.78% <0.00%> (-0.02%) ⬇️
playground 12.76% <0.00%> (-0.02%) ⬇️
tiup 14.64% <0.00%> (+<0.01%) ⬆️
unittest 21.37% <21.95%> (∅)

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

Impacted Files Coverage Δ
components/cluster/command/test.go 50.00% <ø> (-2.75%) ⬇️
components/cluster/command/start.go 35.37% <17.54%> (-42.41%) ⬇️
pkg/crypto/rand/passwd.go 75.00% <75.00%> (ø)
pkg/cluster/spec/tidb.go 66.19% <100.00%> (+0.25%) ⬆️
pkg/cluster/template/scripts/tidb.go 78.18% <100.00%> (+1.26%) ⬆️
pkg/queue/any_queue.go 0.00% <0.00%> (ø)
pkg/telemetry/report.pb.go 1.06% <0.00%> (+0.03%) ⬆️
pkg/cluster/manager/builder.go 71.94% <0.00%> (+0.65%) ⬆️
pkg/cluster/operation/action.go 65.16% <0.00%> (+0.75%) ⬆️
pkg/cluster/manager/display.go 47.70% <0.00%> (+0.92%) ⬆️
... and 61 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 26e5521...3e9e141. Read the comment docs.

@AstroProfundis
Copy link
Contributor Author

Is it available for TLS-enabled cluster?

Yes, as we don't support TLS encrypted MySQL client yet, the protocol between client and TiDB server is identical with those TLS disabled.

@srstack
Copy link
Collaborator

srstack commented Dec 29, 2021

Is it available for TLS-enabled cluster?

TLS-enabled means to enable TLS encrypted communication between TiDB components, but does not include the communication between MySQL Client and TiDB.

Copy link
Collaborator

@srstack srstack 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
Copy link
Member

@srstack: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

/LGTM

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

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

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 29, 2021
@ti-chi-bot ti-chi-bot merged commit 13b33c0 into pingcap:master Dec 29, 2021
@AstroProfundis AstroProfundis deleted the init-root-pass branch December 29, 2021 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tiup set Root Password during deployment
5 participants