-
Notifications
You must be signed in to change notification settings - Fork 503
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
AWS: make public / private subnet selection robust. #2867
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 making figuring out this issue @concretevitamin! The PR looks mostly good to me. Left several comments.
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 fixing this @concretevitamin! LGTM.
sky/utils/controller_utils.py
Outdated
else: | ||
new_skypilot_config = {} | ||
common_utils.dump_yaml(f.name, new_skypilot_config) |
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.
Great catch! Can we remove the entry in the file mounts instead of creating an empty file to save the overhead for uploading the empty file?
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.
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.
LGTM.
* AWS: make public / private subnet selection robust. * Update docs * Fix: handle regions with main route table(s) only * assert * comment * Cache once * format * Add asserts * fix placeholder replacement logic * Minor * Fix bug where we launch a private IP-only VM in a public subnet * Avoid uploading empty config yaml * format
Removes two issues from before
private
is a substr in its name tag)subnet.map_public_ip_on_launch
set to False.This PR uses a more robust method to test if a subnet is public:
igw-*
)igw-*
)Tested:
aws.vpc_name: skypilot-vpc
and correspondinguse_internal_ips,ssh_proxy_command
aws.vpc_name: skypilot-vpc
and correspondinguse_internal_ips,ssh_proxy_command
Speed
for i in $(seq 3); do sky launch --cloud aws -i0 --down --use-spot --region us-east-1 -y >log-${i}; done
No VPC/private IP settings
sky launch -c dbg --cloud aws -i0 --down --use-spot -y --region ap-northeast-3
skypilot-vpc
route tables (us-east-2)sky launch --cloud aws -i0 --down --use-spot -y --region us-east-2
sky launch --gpus A100:8 --cloud aws -i0 --down --use-spot -y
With
aws.vpc_name: skypilot-vpc
onlysubnet.map_public_ip_on_launch
set to False.sky launch --cloud aws -i0 --down --use-spot -y --region us-east-2
With
aws.vpc_name: skypilot-vpc
and correspondinguse_internal_ips,ssh_proxy_command
sky launch --cloud aws -i0 --down --use-spot -y --region us-east-2
sky launch --cloud aws -i0 --down --gpus A10G --use-spot -y
Tested (run the relevant ones):
bash format.sh
pytest tests/test_smoke.py
pytest tests/test_smoke.py::test_fill_in_the_name
bash tests/backward_comaptibility_tests.sh