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] Expose NodeDeathInfo in state CLI #45644

Merged
merged 5 commits into from
May 31, 2024

Conversation

ruisearch42
Copy link
Contributor

@ruisearch42 ruisearch42 commented May 30, 2024

Why are these changes needed?

This is the 5th (last) PR of a series to better propagate and expose node death information.

This PR does the following:

  • Expose NodeDeathInfo in state CLI
  • Update NodeDiedError message to direct to the accurate node death info

Related issue number

[1/5] #45128
[2/5] #45357
[3/5] #45320
[4/5] #45497

Sample output

ray list nodes
======== List: 2024-05-31 10:17:06.320697 ========
Stats:
------------------------------
Total: 2

Table:
------------------------------
    NODE_ID                                                   NODE_IP    IS_HEAD_NODE    STATE    STATE_MESSAGE                                                   NODE_NAME    RESOURCES_TOTAL                   LABELS
 0  9e757009998dbdbe546068b7b898af3d34dfa82e89f4854de422ab5f  127.0.0.1  True            ALIVE                                                                    127.0.0.1    CPU: 1.0                          ray.io/node_id: 9e757009998dbdbe546068b7b898af3d34dfa82e89f4854de422ab5f
                                                                                                                                                                               head: 1.0
                                                                                                                                                                               memory: 17.474 GiB
                                                                                                                                                                               node:127.0.0.1: 1.0
                                                                                                                                                                               node:__internal_head__: 1.0
                                                                                                                                                                               object_store_memory: 150.000 MiB
 1  bc74e1484266e0e5b9f0c8c610a07d8dfc0052f46fc3b07fda46220c  127.0.0.1  False           DEAD     Terminated due to idle (no Ray activity): idle for long enough  127.0.0.1    CPU: 1.0                          ray.io/node_id: bc74e1484266e0e5b9f0c8c610a07d8dfc0052f46fc3b07fda46220c
                                                                                                                                                                               memory: 19.238 GiB
                                                                                                                                                                               node:127.0.0.1: 1.0
                                                                                                                                                                               object_store_memory: 150.000 MiB
                                                                                                                                                                               worker: 1.0
ray list nodes --detail
---
-   node_id: 9e757009998dbdbe546068b7b898af3d34dfa82e89f4854de422ab5f
    node_ip: 127.0.0.1
    is_head_node: true
    state: ALIVE
    state_message: null
    node_name: 127.0.0.1
    resources_total:
        object_store_memory: 150.000 MiB
        memory: 17.474 GiB
        node:127.0.0.1: 1.0
        head: 1.0
        CPU: 1.0
        node:__internal_head__: 1.0
    labels:
        ray.io/node_id: 9e757009998dbdbe546068b7b898af3d34dfa82e89f4854de422ab5f
    start_time_ms: '2024-05-31 10:16:51.475000'
    end_time_ms: '1969-12-31 16:00:00'
-   node_id: bc74e1484266e0e5b9f0c8c610a07d8dfc0052f46fc3b07fda46220c
    node_ip: 127.0.0.1
    is_head_node: false
    state: DEAD
    state_message: 'Terminated due to idle (no Ray activity): idle for long enough'
    node_name: 127.0.0.1
    resources_total:
        CPU: 1.0
        object_store_memory: 150.000 MiB
        node:127.0.0.1: 1.0
        memory: 19.238 GiB
        worker: 1.0
    labels:
        ray.io/node_id: bc74e1484266e0e5b9f0c8c610a07d8dfc0052f46fc3b07fda46220c
    start_time_ms: '2024-05-31 10:16:52.014000'
    end_time_ms: '2024-05-31 10:16:53.266000'
...

Also checked dashboard has no regression:
Screenshot 2024-05-31 at 10 17 54 AM

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 :(

Also update NodeDiedError message

Signed-off-by: Rui Qiao <[email protected]>
Signed-off-by: Rui Qiao <[email protected]>
@ruisearch42 ruisearch42 marked this pull request as ready for review May 30, 2024 22:59
python/ray/util/state/common.py Outdated Show resolved Hide resolved
python/ray/util/state/common.py Outdated Show resolved Hide resolved
src/ray/core_worker/transport/direct_task_transport.cc Outdated Show resolved Hide resolved
src/ray/core_worker/transport/direct_task_transport.cc Outdated Show resolved Hide resolved
src/ray/core_worker/transport/direct_task_transport.cc Outdated Show resolved Hide resolved
Signed-off-by: Rui Qiao <[email protected]>
Copy link
Collaborator

@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 pending state tests

@jjyao jjyao added the go add ONLY when ready to merge, run all tests label May 31, 2024
Signed-off-by: Rui Qiao <[email protected]>
Signed-off-by: Rui Qiao <[email protected]>
@jjyao jjyao merged commit fe191e6 into ray-project:master May 31, 2024
6 checks passed
richardsliu pushed a commit to richardsliu/ray that referenced this pull request Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants