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

[Core] Better propogate node death information #45128

Merged
merged 44 commits into from
May 15, 2024

Conversation

ruisearch42
Copy link
Contributor

@ruisearch42 ruisearch42 commented May 3, 2024

Why are these changes needed?

This is the first PR of a series to better propagate and expose node death information.

Background: in Ray, a node can be either ALIVE or DEAD, and the death reason of a node could be unexpected (e.g., crash) or expected (e.g., idle termination or spot preemption). Currently, GCS knows the actual death reason, but this information is not shown to the users. As a result, users might think a node crashes when they see it is DEAD, while in reality these could be expected scenarios such as spot preemption. This may give users the wrong impression that Ray is unstable. In the series of changes, we are going to better propagate and expose the node death info.

This PR does the following:

  • Add reason_message to NodeDeathInfo so that we track more verbose node death info
  • Introduce UnregisterNode PRC in GCS and use it instead of DrainNode RPC wherever appropriate

This PR is the basis for future changes where we:

  • Maintain and expose the proper node death information for cases where cloud provider forcefully kill the instance before node draining is complete
  • Expose node death information to dashboard as well as exception/error messages

See more details in design doc:
https://docs.google.com/document/d/1tn6Uj-SoEAaBu5_HWl4dNo3JBzTd_w09RPsIWQpUU_s/edit

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
ruisearch42 and others added 27 commits May 3, 2024 18:27
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
This reverts commit dd3d285.

Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
This reverts commit 7acc550.

Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
@ruisearch42 ruisearch42 marked this pull request as ready for review May 13, 2024 21:56
Copy link
Contributor

@jjyao jjyao left a comment

Choose a reason for hiding this comment

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

LG

src/ray/gcs/gcs_client/accessor.cc Outdated Show resolved Hide resolved
src/ray/gcs/gcs_server/gcs_node_manager.cc Show resolved Hide resolved
ruisearch42 and others added 2 commits May 13, 2024 17:40
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <161574667+ruisearch42@users.noreply.github.com>
Copy link
Contributor

@jjyao jjyao left a comment

Choose a reason for hiding this comment

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

Let's add some tests

src/ray/gcs/gcs_client/accessor.cc Outdated Show resolved Hide resolved
src/ray/gcs/gcs_client/accessor.h Outdated Show resolved Hide resolved
src/ray/gcs/gcs_client/accessor.h Outdated Show resolved Hide resolved
src/ray/gcs/gcs_server/gcs_node_manager.cc Show resolved Hide resolved
src/ray/raylet/agent_manager.cc Outdated Show resolved Hide resolved
src/ray/raylet/main.cc Outdated Show resolved Hide resolved
src/ray/raylet/node_manager.cc Outdated Show resolved Hide resolved
src/ray/raylet/runtime_env_agent_client.cc Outdated Show resolved Hide resolved
src/ray/raylet/scheduling/local_resource_manager.cc Outdated Show resolved Hide resolved
ruisearch42 and others added 7 commits May 13, 2024 23:04
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Copy link
Contributor

@jjyao jjyao left a comment

Choose a reason for hiding this comment

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

lgtm

Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
@jjyao
Copy link
Contributor

jjyao commented May 14, 2024

[2024-05-14T22:35:24Z] Traceback (most recent call last):
[2024-05-14T22:35:24Z]   File "ci/lint/pytest_checker.py", line 126, in <module>
[2024-05-14T22:35:24Z]     main(data)
[2024-05-14T22:35:24Z]   File "ci/lint/pytest_checker.py", line 111, in main
[2024-05-14T22:35:24Z]     raise RuntimeError(
[2024-05-14T22:35:24Z] RuntimeError: Found py_test files without `if __name__ == "__main__":` snippet:
[2024-05-14T22:35:24Z] python/ray/tests/test_node_death.py
[2024-05-14T22:35:24Z] If this is intentional, please add a `no_main` tag to bazel BUILD entry for those files.

Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
@jjyao jjyao merged commit a475ffe into ray-project:master May 15, 2024
6 checks passed
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Jun 6, 2024
- Add reason_message to NodeDeathInfo so that we track more verbose node death info
- Introduce UnregisterNode PRC in GCS and use it instead of DrainNode RPC wherever appropriate

Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Ryan O'Leary <ryanaoleary@google.com>
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Jun 6, 2024
- Add reason_message to NodeDeathInfo so that we track more verbose node death info
- Introduce UnregisterNode PRC in GCS and use it instead of DrainNode RPC wherever appropriate

Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: Ryan O'Leary <ryanaoleary@google.com>
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Jun 7, 2024
- Add reason_message to NodeDeathInfo so that we track more verbose node death info
- Introduce UnregisterNode PRC in GCS and use it instead of DrainNode RPC wherever appropriate

Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
GabeChurch pushed a commit to GabeChurch/ray that referenced this pull request Jun 11, 2024
- Add reason_message to NodeDeathInfo so that we track more verbose node death info
- Introduce UnregisterNode PRC in GCS and use it instead of DrainNode RPC wherever appropriate

Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Signed-off-by: gchurch <gabe1church@gmail.com>
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.

None yet

2 participants