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

Before proceeding to initialize TiDB, we wait for the TiDB host:port is open. #1296

Merged
merged 5 commits into from
Dec 6, 2019

Conversation

cofyc
Copy link
Contributor

@cofyc cofyc commented Dec 6, 2019

What problem does this PR solve?

#1255

What is changed and how does it work?

Before proceeding to initialize TiDB, we wait for the TiDB host:port is open. This avoids unnecessary pod restarts which may result in a very long restart delay (10s, 20s, .., 5 mins).
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy

Check List

Tests

  • Unit test
  • E2E test

Does this PR introduce a user-facing change?:

tidb-initializer: wait for the TiDB host:port is open before processing to initialize TiDB. This speeds up TiDB initialization.

@cofyc
Copy link
Contributor Author

cofyc commented Dec 6, 2019

/run-e2e-test

- sh
- -c
- |
trap exit TERM
Copy link
Contributor Author

Choose a reason for hiding this comment

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

able to terminate fast on kill container signal (TERMINAL) (xref: kubernetes/kubernetes#64015 (comment))

Copy link
Contributor

Choose a reason for hiding this comment

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

I always run something like dumb-init in my pods so that these issues don't show up

@cofyc
Copy link
Contributor Author

cofyc commented Dec 6, 2019

/run-e2e-test

Copy link
Contributor

@onlymellb onlymellb left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@aylei aylei left a comment

Choose a reason for hiding this comment

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

LGTM

@cofyc cofyc merged commit 6f06015 into pingcap:master Dec 6, 2019
yahonda pushed a commit that referenced this pull request Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants