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

GCP/provisioner: Handle the RESOURCE_NOT_FOUND error. #1842

Merged
merged 2 commits into from
Apr 8, 2023

Conversation

concretevitamin
Copy link
Collaborator

Fixes #1797.

I've tried a few days and finally got a set_trace inside need_ray_up(), tested that the re.search() there works. This doesn't test things end-to-end, however.

sky launch -y --gpus A100-80GB:8 --cloud gcp --down -c dbg -r 

Tested (run the relevant ones):

  • Any manual or new tests for this PR (please specify below)
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
  • Backward compatibility tests: bash tests/backward_comaptibility_tests.sh

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.

Nice! Thanks for fixing this issue @concretevitamin!

Comment on lines 661 to 668
# https://github.com/skypilot-org/skypilot/issues/1797
# The VM may be alive on console. In the inner provision
# loop we have used retries to recover but failed. The
# provision loop will terminate the potentially live VMs
# and move onto the next zone. Since the VM may have been
# provisioned in this zone, it doesn't seem right to block
# the current zone.
pass
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we have done the retry in _gang_schedule_ray_up by adding that error in the need_ray_up, we should add the zone to the block list here, to avoid the outer failover loop go to that zone again.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

IIRC, without -r the outer loop will do a single pass over all zones, so this zone will not be tried again. So blocking vs. not blocking has the same effect. With -r, it's desirable to retry this zone. Is this the case?

Copy link
Collaborator

@Michaelvll Michaelvll Apr 8, 2023

Choose a reason for hiding this comment

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

Our yield zones will not loop through all the zones in a region for spot, as we currently rely on the optimizer to generate optimization result for per-zone. That is to say the failover for zones will happen here, but not here.
However, since we have add the to_provision in the block list here, it should explain why it does not go to that zone again. I still prefer to add that to the block list here for consistency with the other parts. Wdyt?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, that's right. I got caught up thinking _yield_zones() will go through the zones. Added now.

@concretevitamin concretevitamin changed the title GPC/provisioner: Mitigate RESOURCE_NOT_FOUND error for A100s. GCP/provisioner: Handle the RESOURCE_NOT_FOUND error. Apr 8, 2023
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 for fixing this! LGTM.

@concretevitamin concretevitamin merged commit 15f01d6 into master Apr 8, 2023
15 checks passed
@concretevitamin concretevitamin deleted the fix-gcp-not-found branch April 8, 2023 18:18
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.

RESOURCE_NOT_FOUND error in launching a GCP VM
2 participants