-
Notifications
You must be signed in to change notification settings - Fork 4k
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
The script to update AWS EC2 instances fails with MissingRegion error #4859
Comments
Note: I see that the official AWS documentation https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstanceTypes.html that the |
I think this was introduced by @AustinSiu in this PR, #4436. @AustinSiu may you let me know if there is any piece of information I'm missing? |
@gregth you're right in that my change only supports generating the instance list when a region is specified, compared to prior to my change, when it made separate requests for all regions if one wasn't provided.
Is this still a case CA wants to support? If not, it would be best to remove this line to avoid confusion. |
@AustinSiu we, at Arrikto, have been relying on this script to generate a complete list of instances for all the AWS regions. This option was very useful. I believe it is worth investigating how we can keep the same functionality while using the AWS SDK. What I think of is, does the SDK offer a way to list all AWS regions? Then we can fetch the instances for every region. |
I believe that the team maintaining the cluster autoscaler has been using the script to regenerate the static instance list across all regions periodically and ensure that everything is up-to-date. Maybe @gjtempleton who had lately updated the static instances list can further comment on this. |
My general view would be that the current code using the AWS APIs is a significant improvement on the previous setup, and that it provides us with the functionality we need given AWS announces where new instances are available on launch, so we can just run the script in that region when refreshing the static list, though we should as Austin says remove the confusing line. I'd rather not maintain the old version of the script as well as the new version. |
/area provider/aws |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Which component are you using?:
cluster-autoscaler
What version of the component are you using?:
The version from latest
master
.What environment is this in?:
AWS
What did you expect to happen?:
Running
run ec2_instance_types/gen.go
without any further flags, shall update the instances for all AWS regions. The code indicates "It will populate list from all regions if region is not specified.":What happened instead?:
It seems that the script can be executed without any flags for any release up to and including
cluster-autoscaler-release-1.22
. For any branches newer than that, i.e., starting fromcluster-autoscaler-release-1.23
and up to themaster
, this fails with:How to reproduce it (as minimally and precisely as possible):
Install golang 1.17.5 (as specified in
builder/Dockerfile
) and rungo run ec2_instance_types/gen.go
inside theautoscaler/cluster-autoscaler/cloudprovider/aws
directory.Anything else we need to know?:
The
GenerateEC2InstanceTypes()
method has been rewritten, see commit a1faedd:The AWS SDK seems to expect a region, and it raises an error if the region string is empty.
The text was updated successfully, but these errors were encountered: