-
Notifications
You must be signed in to change notification settings - Fork 589
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: Support for custom VPC. #2764
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 for adding this @concretevitamin! This is very useful for our users. Just left sevral comments, and I will try it out soon.
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, PTAL.
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 update @concretevitamin! LGTM.
try: | ||
vpc_name = gcp_config.get_usable_vpc(config) | ||
except RuntimeError as e: | ||
# Launching a TPU and encountering a bootstrap-phase error, no point | ||
# in failover unless: | ||
# TODO(zongheng): handle failover when multi-resource is added. | ||
with ux_utils.print_exception_no_traceback(): | ||
raise e |
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.
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.
Done, PTAL.
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 adding the doc and the fixes @concretevitamin! LGTM.
_skypilot_log_error_and_exit_for_failover( | ||
f"No VPC with name {specific_vpc_to_use!r} is found. " | ||
"To fix: specify a correct VPC name." | ||
) | ||
|
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.
assert specific_vpc_to_use is None
or add a comment for readability : )
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.
Added # Should not reach here.
|
Thank you @concretevitamin !! |
Support specifying a specific VPC to use for GCP.
In
~/.sky/config.yaml
:TODO
Tested (run the relevant ones):
Code formatting:
bash format.sh
Any manual or new tests for this PR (please specify below)
sky launch --cloud gcp --cpus 2+ -c dbg2 --region us-west4
correctly fails + skips the entire region.sky launch --cpus 2+ -c dbg --use-spot
correctly skips GCP and fails over to AWSsky launch --cloud gcp --cpus 2+ -c dbg --use-spot
correctly errors out with no failoversky tpunode
correctly errors out with no failoverAll smoke tests:
pytest tests/test_smoke.py
:pytest tests/test_smoke.py --gcp
Relevant individual smoke tests:
pytest tests/test_smoke.py::test_fill_in_the_name
Backward compatibility tests:
bash tests/backward_comaptibility_tests.sh