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

[k8s] Fix --purge not cleaning up cluster in stale k8s context #4514

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

romilbhardwaj
Copy link
Collaborator

Fixes issue reported here: #2807 (comment)

sky down --purge now works again even with stale or invalid context.

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Tested with sky local up; sky launch -c test --cloud kubernetes -- echo hi; mv ~/.kube/config ~/.kube/config.bak; sky down --purge test

Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

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

Thanks @romilbhardwaj! Left a comment for discussion.

Comment on lines +4230 to +4231
raise RuntimeError(f'Instance {node_id} in unexpected '
'state {node_status}.')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it be possible to have the purge check here instead, so that we can correctly print out some warnings for the clusters not correctly cleaned up even when --purge is specified.

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.

2 participants