-
Notifications
You must be signed in to change notification settings - Fork 436
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
[Feature] Add force
to worker group suspend
API
#2744
Comments
I guess we just need an optional The idea is that KubeRay will kill the suspended group after the grace period anyway if the Ray Autoscaler is enabled. So that we can still stop the suspended group even with the old Ray versions that don’t read the If the Ray Autoscaler is not enabled, then it is KubeRay’s responsibility to kill the suspended group immediately. |
After reconsidering all the above proposals, I am afraid we must forbid |
@rueian Oops, I was interrupted by other tasks while writing the issue. I’ll finish it and ping you for feedback later. |
cc @rueian @andrewsykim need some inputs for this proposal. We can also discuss this in tomorrow's community sync.
|
I prefer (1) because KubeRay operator should kill the group immediately after it is marked with suspend=true when Autoscaler is not enabled. |
To summarize all details related to the ongoing For KubeRay 1.3, we will introduce the suspend: true When a user sets However, the field will have NO effect on an Autoscaler-enabled RayCluster. That is because the RayCluster Autoscaler will malfunction if KubeRay kills the worker group. Such as:
This is ongoing by #2748. To avoid this malfunctioning, we have a patch for Ray's Autoscaler to let it be aware of the But for #2748, setting For KubeRay 1.4, besides allowing suspend worker groups on future Ray with Autoscaler, we plan to extend the API to: suspend: true
suspendOptions:
gracePeriod: 10 The new |
|
Search before asking
Description
#2663 adds an API to
suspend
a worker group, and @rueian is working on #2666 to avoid Autoscaler scaling up the suspending or suspended worker groups unexpectedly.For RayJob, it's fine for KubeRay to kill worker Pods directly. However, we want to expose the suspend API of worker groups to users so that they can also terminate a worker group using the API.
In that case, it seems better to delegate the responsibility of shutting down the Ray pods to the Ray Autoscaler, as it can drain the Ray Pods.
This issue proposes an API change:
Case 1:
force: true
force
is set to true, KubeRay kills the pods directly, and the Ray Autoscaler simply avoids scaling the worker group up or down. The RayJob should fall into this category.suspend
because the Ray Autoscaler will still try to update RayCluster CR aftersuspend
is set to true. RayCluster controller should not create any Ray Pod for the worker group whensuspend
is set to true.Case 2:
force: false
,timeout
is not set.suspend
: Autoscaler drains the Ray Pods, and scales down the Ray Pods.Case 3:
force: false
,timeout
is set.suspend
: Autoscaler drains the Ray Pods, and scales down the Ray Pods. If Ray Autoscaler doesn't scale down withintimeout
, KubeRay deletes these Pods.timeout
.Another option is to rely on
rayVersion
to check whether the Ray Autoscaler supportssuspend
or not, and it is considered as a CR spec validation error ifsuspend
is set to true but the Ray Autoscaler doesn't supportsuspend
. Maybe this is easier for us, as we won’t need to maintain behavior that is hard to define.Use case
No response
Related issues
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: