-
Notifications
You must be signed in to change notification settings - Fork 500
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
create all statefulsets immediately #581
Conversation
03a6fd1
to
5e5d615
Compare
d3732eb
to
6fdfd02
Compare
f36c244
to
bbe51cc
Compare
fe614c9
to
9e21867
Compare
The usage of PD APIs in wait-for-pd should be updated. For TiDB 3.0 the TiDB component should check the PD api cluster_status for the is_initialized flag as per #586 |
Create the statefulsets immediately. A blocking init container wait-for-pd is used to prevent TiKV and TiDB from immediately starting up.
9966e1f
to
4ffef82
Compare
This gives us the ClusterVersion field for the Config API.
4ffef82
to
a79e221
Compare
a79e221
to
07e3ee4
Compare
I see an issue where the operator will expand the tidb statefulset when it is waiting in init for a long time
|
When this came out of the init state the extra tidb pods did get terminated. |
okay, I added some code to handle that case |
This only works on newer versions of TiDB
e50a407
to
02e8b73
Compare
only add the wait for pd container on create
7d7825c
to
37fdfea
Compare
save the initialized variable into the status
@gregwebs Cut of |
Probably needs to be 1.2 |
Okay, removed from v1.1 milestone for now, feel free to add it back if this is necessary to land in v1.1 |
This pr is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days |
* zh: update warning about deleting PVs Signed-off-by: Ran <huangran@pingcap.com> * Update zh/configure-storage-class.md Co-authored-by: DanielZhangQD <36026334+DanielZhangQD@users.noreply.github.com> Co-authored-by: DanielZhangQD <36026334+DanielZhangQD@users.noreply.github.com>
TODO
As per #469 this creates statefulsets and pending pods immediately to help autoscalers scale more quickly.
Design doc is here
A blocking init container wait-for-pd is used to prevent TiKV and TiDB from immediately starting up. This code calls the PD API directly. For TiDB it will call the new status is_initialized API if it is available.
Error handling is also generally improved in the member managers: as a side effect this may fix bugs where the controller sync loop is not re-ran during errors.
The PD API was updated to 3.0 which seems to be backwards compatible for our usage (more testing needed).
Testing notes
I have created 50+ clusters with the operator that has the changes from the first commit. It has the desired effect for autoscaling. The second commit is still being tested.
What is changed and how does it work?
Check List
Tests
Side effects
Increased image size
Originally this change meant shipping another 50M binary. However, overall image size is smaller since this PR was originally started. This work was merged in other Pull requests:
Pending Pod warnings
Upgrade procedure
The PD API was updated to 3.0 which seems to be backwards compatible for our usage. We will probably want to see some additional testing here.
Related changes
Does this PR introduce a user-facing change?
Yes, to the extent users look at pod creation (which we have in our tutorials).