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] Resource leakage for sky down if a multi-node cluster is partially stopped #2089

Closed
Michaelvll opened this issue Jun 16, 2023 · 2 comments · Fixed by #2199
Closed
Labels
bug Something isn't working P0

Comments

@Michaelvll
Copy link
Collaborator

Michaelvll commented Jun 16, 2023

If a multi-node cluster is partially stopped (during autostop or manually stop the worker node), i.e. the cluster is in INIT state, our backend.teardown function will fail to terminate the stopped nodes, as we are using ray down to terminate the cluster, and ray ignores the stopped nodes.
Related code path:

elif (terminate and
(prev_cluster_status == global_user_state.ClusterStatus.STOPPED or
use_tpu_vm)):

To reproduce:

  1. sky launch -c min --cloud gcp --num-nodes 2 --cpus 2
  2. Manually stop the worker node.
  3. sky down min

After that, the head node will be terminated, but the worker node is still in STOPPED state.

One possible solution is to only use our own cloud cli-based termination (should be careful: may need to kill the head node first to avoid ray autoscaler restarting some of the worker nodes, causing leakage).

@Michaelvll Michaelvll added bug Something isn't working P0 labels Jun 16, 2023
@Michaelvll
Copy link
Collaborator Author

Related to this, after #2087 is merged, we should be able to move the terminate commands to the cloud class as well, making the backend.teardown function cleaner.

@HysunHe
Copy link
Contributor

HysunHe commented Jun 16, 2023

@Michaelvll Do we need to include the INIT status here?:

elif (terminate and
(prev_cluster_status IN ( global_user_state.ClusterStatus.STOPPED, global_user_state.ClusterStatus.INIT )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants