-
Notifications
You must be signed in to change notification settings - Fork 539
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] Fix fetching AZ when describe zones permission does not exist in all regions #2463
Conversation
This works for me now! re. #2451 |
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 @Michaelvll! Some minor comments.
@@ -215,3 +215,35 @@ class ClusterOwnerIdentityMismatchError(Exception): | |||
class NoCloudAccessError(Exception): | |||
"""Raised when all clouds are disabled.""" | |||
pass | |||
|
|||
|
|||
class AWSAzFetchingError(Exception): |
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.
(not feeling strongly) nit: AwsAzFetchingError
https://google.github.io/styleguide/cppguide.html#General_Naming_Rules
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.
I slightly prefer the AWS
, as the AWSNodeProvider
from ray code already applies this, but feel free to push back.
Latest UX: $ sky check
Checking credentials to enable clouds for SkyPilot.
AWS: [WARNING] Missing availability zone mappings for the following enabled regions:
Region Reason
ap-southeast-2, ap-northeast-2, us-west-2, ap-south-1, Failed to retrieve availability zones. Please ensure that the
us-east-2, eu-west-2, eu-west-1, eu-central-1, us-east-1, `ec2:DescribeAvailabilityZones` action is enabled for your AWS account in IAM.
ap-northeast-1, ap-northeast-3, eu-west-3, ap-southeast-1, Ref: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabi
eu-north-1, ca-central-1 lityZones.html.
AWS: enabled |
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, thanks @Michaelvll.
@@ -136,7 +136,7 @@ def _get_availability_zones(region: str) -> pd.DataFrame: | |||
with ux_utils.print_exception_no_traceback(): | |||
raise exceptions.AWSAzFetchingError( | |||
region, | |||
reason=exceptions.AWSAzFetchingError.Reason.CREDENTIAL | |||
reason=exceptions.AWSAzFetchingError.Reason.AUTHENTICATION |
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.
How about just adhere to the name, AUTH_FAILURE?
Co-authored-by: Zongheng Yang <[email protected]>
Co-authored-by: Zongheng Yang <[email protected]>
…org/skypilot into fix-aws-without-describe-zones
Fixes #2451
Current logging for
sky check
:Tested (run the relevant ones):
bash format.sh
sky check
with an AWS account with the following IAM policy (only allow the permission for a single region:pytest tests/test_smoke.py
pytest tests/test_smoke.py::test_fill_in_the_name
bash tests/backward_comaptibility_tests.sh