-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Core] Better propogate node death information (#45128)
- 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>
- Loading branch information
1 parent
cf7a09d
commit a475ffe
Showing
40 changed files
with
439 additions
and
209 deletions.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import sys | ||
import pytest | ||
|
||
import ray | ||
|
||
from ray.core.generated import gcs_pb2 | ||
|
||
|
||
def test_normal_termination(ray_start_cluster): | ||
cluster = ray_start_cluster | ||
cluster.add_node(resources={"head": 1}) | ||
ray.init(address=cluster.address) | ||
worker_node = cluster.add_node(resources={"worker": 1}) | ||
cluster.wait_for_nodes() | ||
worker_node_id = worker_node.node_id | ||
cluster.remove_node(worker_node) | ||
|
||
worker_node_info = [ | ||
node for node in ray.nodes() if node["NodeID"] == worker_node_id | ||
][0] | ||
assert not worker_node_info["Alive"] | ||
assert worker_node_info["DeathReason"] == gcs_pb2.NodeDeathInfo.Reason.Value( | ||
"EXPECTED_TERMINATION" | ||
) | ||
assert worker_node_info["DeathReasonMessage"] == "Received SIGTERM" | ||
|
||
|
||
if __name__ == "__main__": | ||
sys.exit(pytest.main(["-sv", __file__])) |
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
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.