-
Notifications
You must be signed in to change notification settings - Fork 540
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
Conversation
There was a problem hiding this 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.
sky/backends/cloud_vm_ray_backend.py
Outdated
raise RuntimeError(f'Instance {node_id} in unexpected ' | ||
'state {node_status}.') |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah good point, updated the purge condition checks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks @romilbhardwaj! LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix, Romil!
Fixes issue reported here: #2807 (comment)
sky down --purge
now works again even with stale or invalid context.Tested (run the relevant ones):
bash format.sh
sky local up; sky launch -c test --cloud kubernetes -- echo hi; mv ~/.kube/config ~/.kube/config.bak; sky down --purge test