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

Tidb support setting a random password. #4328

Merged
merged 87 commits into from
Jan 26, 2022

Conversation

mikechengwei
Copy link
Contributor

What problem does this PR solve?

#4326

What is changed and how does it work?

Support spec.tidb.initializer.createPassword field, which enable will auto generate random password and set up.

Code changes

  • Has Go code change
  • Has CI related scripts change

Tests

  • Unit test
  • E2E test
  • Manual test
  • No code

Side effects

  • Breaking backward compatibility
  • Other side effects:

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release Notes

Please refer to Release Notes Language Style Guide before writing the release note.

Tidb support setting a random password by `spec.tidb.initializer.createPassword` field.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Dec 26, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • DanielZhangQD
  • csuzhangxc

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.

@mikechengwei mikechengwei changed the title Tidb support init random password. Tidb support setting a random password. Dec 26, 2021
@mikechengwei mikechengwei changed the title Tidb support setting a random password. [WIP]Tidb support setting a random password. Dec 27, 2021
@codecov-commenter
Copy link

codecov-commenter commented Dec 27, 2021

Codecov Report

Merging #4328 (8f9156d) into master (2f3e25e) will increase coverage by 8.99%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #4328      +/-   ##
==========================================
+ Coverage   62.63%   71.62%   +8.99%     
==========================================
  Files         184      188       +4     
  Lines       19598    22086    +2488     
==========================================
+ Hits        12275    15820    +3545     
+ Misses       6176     5139    -1037     
+ Partials     1147     1127      -20     
Flag Coverage Δ
e2e 59.55% <0.00%> (?)
unittest 62.33% <0.00%> (-0.30%) ⬇️

pkg/util/util.go Outdated
Comment on lines 440 to 442
10, // number of digits to include in the result
0, // number of symbols to include in the result
false, // noUpper
Copy link
Member

@csuzhangxc csuzhangxc Dec 29, 2021

Choose a reason for hiding this comment

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

why 0 symbols?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have reset a value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

password example :_aL`re5t6gz.Z

@mikechengwei mikechengwei changed the title [WIP]Tidb support setting a random password. Tidb support setting a random password. Jan 5, 2022
@mikechengwei
Copy link
Contributor Author

/test pull-e2e-kind

1 similar comment
@mikechengwei
Copy link
Contributor Author

/test pull-e2e-kind

Copy link
Contributor

@DanielZhangQD DanielZhangQD left a comment

Choose a reason for hiding this comment

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

LGTM

@DanielZhangQD
Copy link
Contributor

/test pull-e2e-kind

@DanielZhangQD
Copy link
Contributor

/test pull-e2e-kind-br

1 similar comment
@DanielZhangQD
Copy link
Contributor

/test pull-e2e-kind-br

max-open-files: 256
tidb:
initializer:
createPassword: true
Copy link
Member

Choose a reason for hiding this comment

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

add a comment to highlight this line?

pkg/util/util.go Outdated Show resolved Hide resolved
pkg/manager/member/tidb_member_manager.go Outdated Show resolved Hide resolved
@DanielZhangQD
Copy link
Contributor

/run-all-tests

@mikechengwei
Copy link
Contributor Author

/run-all-tests

1 similar comment
@DanielZhangQD
Copy link
Contributor

/run-all-tests

@DanielZhangQD
Copy link
Contributor

/test pull-e2e-kind-basic

@DanielZhangQD
Copy link
Contributor

/test pull-e2e-kind

1 similar comment
@mikechengwei
Copy link
Contributor Author

/test pull-e2e-kind

@mikechengwei
Copy link
Contributor Author

/test pull-e2e-kind-basic

1 similar comment
@DanielZhangQD
Copy link
Contributor

/test pull-e2e-kind-basic

@DanielZhangQD
Copy link
Contributor

/test pull-e2e-kind

@DanielZhangQD
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 8f9156d

@ti-chi-bot ti-chi-bot merged commit 85c79f4 into pingcap:master Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants