-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[core][autoscaler] Fix incorrectly terminating nodes misclassified as idle in autoscaler v1 #48519
Merged
rickyyx
merged 11 commits into
ray-project:master
from
mimiliaogo:autoscaler-v1-idle-check
Dec 3, 2024
Merged
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c43f1c4
Fix incorrectly terminating nodes misclassified as idle in autoscaler v1
mimiliaogo 0c8da1e
map provider node id to raylet id
mimiliaogo 3f31bfb
use GetClusterResourceState to get correct idle time
mimiliaogo 786bc26
fix review suggestions directly use AS v2 sdk and pass last_used inst…
mimiliaogo 5d8e4b3
add test for autoscaler not killing blocking node
mimiliaogo 9fca93b
add the fixture to isolate autoscaler v1 and v2 testing
mimiliaogo 018641c
fix default value
mimiliaogo 898dc51
Add logging for missing node_id in ray_nodes_idle_duration_ms_by_id a…
mimiliaogo cbee98b
make node_idle_duration_s a required field and modify testing code ba…
mimiliaogo 7a34ffe
add test for scaling down node when idle time-out
mimiliaogo 1e424ce
add explanation of DUMMY_IDLE_DURATION_S
mimiliaogo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
In which cases will this condition occur?
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.
In theory,
get_all_resource_usage
andget_cluster_resource_state
should return the same set of nodes. However, since they are implemented in Autoscaler v1 and v2 respectively, I'm uncertain if there may be any discrepancies between them in some special cases.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.
We may need to understand how severe the inconsistency is to determine whether this warrants a warning or a panic. @rickyyx Would you mind providing some insights?
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.
Both seem to be getting data from GCS, which should be mostly consistent I believe, but yeah, the codepaths that generate the data is different -> i think graceful handling with warnings is fine (they should eventually be consistent)
BTW, is there any reason we don't use mainly the v2's info from
get_cluster_resource_state
here entirely? I think the only v1 bit of info that's missing in v2 is "cluster_full", which we could probably also add to v2.I don't have a strong opinion between the below given the source of info is both GCS, and the likelihood of inconsistency is low IMO:
I think merging this PR to fix the idle issue is fine - and we could follow up to bring v2's RPC in parity with V1 so we could use V2 entirely here. Or if we are pushing V2 really hard, we might just deprecate V1 in the future.
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.
How about we go with option 1 so that we can reduce the dependency between V1 and V2?