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
Add retry for DNS lookup failure exception in TiDBInitializer #3884
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3884 +/- ##
==========================================
- Coverage 67.87% 62.39% -5.48%
==========================================
Files 175 171 -4
Lines 18612 18122 -490
==========================================
- Hits 12632 11308 -1324
- Misses 4881 5717 +836
+ Partials 1099 1097 -2
|
@@ -341,11 +341,18 @@ var tidbInitStartScriptTpl = template.Must(template.New("tidb-init-start-script" | |||
host = '{{ .ClusterName }}-tidb' | |||
permit_host = '{{ .PermitHost }}' | |||
port = 4000 | |||
for i in range(0, 10): |
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.
if after 10 times try and all failed it will continue to run, but conn is not connect successful ?
i think this is not expected
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.
LGTM
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by writing |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: d5de01d
|
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-1.1 in PR #3888 |
What problem does this PR solve?
Sometimes when DNS service is not stable, in-pod DNS lookup requests will fail. We need to add the retry logic for the related exception.
What is changed and how does it work?
Code changes
Tests
Manual test:
Side effects
Related changes
Release Notes
Please refer to Release Notes Language Style Guide before writing the release note.