-
Notifications
You must be signed in to change notification settings - Fork 48
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
Replicas update one-by-one regardless of rolling update parameter maxUnavailable #315
Comments
Yes, enable the maxUnavailable is the default requirement for lws, but as you mentioned, this is blocked with kubernetes/enhancements#961 for a long time.
We rely on statefulset's reconciliation logic, so I personally think this is infeasible if we do not touch the statefulset. |
@kerthcet can we update the docs to clearly indicate this dependency? |
Thanks Kante. By "polyfill" I mean after reconciling the leader statefulset, the partition is correctly set, then leaderworkerset_controller can clone the StaetfulSet controller logic to loop through the replicas and then delete any stale pods. LWS can do a nil check of MaxUnavailable of the leader statefulset spec to see if the feature is enabled or not, then apply/skip the polyfill accordingly. This way LWS MaxUnavailable support won't be blocked by the Statefulset feature state. |
Yes, it's doable by copy-paste the code, but I don't think we'll go in this way, instead we should try to push the feature to beta and ga finally. The feature is blocked mostly because no volunteers. But if we see more requirements on this, we may consider next. Thanks anyway, I'll update the doc first, but let's keep this issue open. |
/remove-kind bug Make this a feature instead. |
What happened:
As the subject, when maxUnavailable is set to 2 or more, the rolling update still refresh replicas one by one.
What you expected to happen:
The rolling update should honor the maxUnavailable parameter and work as documented.
How to reproduce it (as minimally and precisely as possible):
Preparation:
Change replicas from 2 to 5
Add the following rolling strategy, note the maxUnavailable parameter is set to 2
Steps to reproduce:
Anything else we need to know?:
The problem is that the rolling update option maxUnavailable depends on a StatefulSet feature in alpha state (FEATURE STATE: Kubernetes v1.24 [alpha]), and alpha features are not enabled in production stage of cloud providers. For example,
The maxUnavailable support is critical for real world use cases like large model deployment. For example, for a cluster with 80 model replicas, if updating a single replica takes 20 minutes, resulting in a total update time of over one day. But if maxUnavailable is working, setting it to 20%, the total update time would reduce to less than two hours.
If the MaxUnavailableStatefulSet feature is not going GA soon, an idea to mitigate the problem is adding a polyfill: porting the related StaetfulSet controller logic to LWS controller. Is the idea reasonable to you?
Environment:
kubectl version
): v1.31.3git describe --tags --dirty --always
): v0.3.0-8-ga4c468ecat /etc/os-release
): Amazon Linux 2uname -a
): 5.10.218The text was updated successfully, but these errors were encountered: