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

No instance types returned for any Europe regions on AWS #365

Closed
mrsheepuk opened this issue Aug 5, 2020 · 5 comments · Fixed by #366
Closed

No instance types returned for any Europe regions on AWS #365

mrsheepuk opened this issue Aug 5, 2020 · 5 comments · Fixed by #366
Labels
kind/bug Something isn't working

Comments

@mrsheepuk
Copy link
Contributor

mrsheepuk commented Aug 5, 2020

Describe the bug
All European regions on AWS now return no instance types - see log message numberOfVms: 0:

{"application":"cloudinfo","environment":"production","level":"debug","msg":"getting available instance types from AWS API","provider":"amazon","region":"eu-west-1","time":"2020-08-05T09:38:42Z"}
{"application":"cloudinfo","environment":"production","level":"debug","missingAttrs":{},"msg":"instance types with missing attributes","provider":"amazon","region":"eu-west-1","time":"2020-08-05T09:38:42Z"}
{"application":"cloudinfo","environment":"production","level":"debug","missingGPU":null,"msg":"instance types with missing gpu","provider":"amazon","region":"eu-west-1","time":"2020-08-05T09:38:42Z"}
{"application":"cloudinfo","environment":"production","level":"debug","msg":"couldn't find any virtual machines to recommend","provider":"amazon","region":"eu-west-1","time":"2020-08-05T09:38:42Z"}
{"application":"cloudinfo","environment":"production","level":"debug","msg":"found vms","numberOfVms":0,"provider":"amazon","region":"eu-west-1","time":"2020-08-05T09:38:42Z"}

This is almost certainly caused by the AWS SDK upgrade PR - noting specifically this change in the expected region descriptions - the pricing API still uses 'EU' not 'Europe' in its location field, so this now will not match any European instances:

aws --region us-east-1 pricing get-attribute-values --service-code AmazonEC2 --attribute-name location --output table

----------------------------------
|       GetAttributeValues       |
+--------------------------------+
||        AttributeValues       ||
|+------------------------------+|
||             Value            ||
|+------------------------------+|
||  AWS GovCloud (US-East)      ||
||  AWS GovCloud (US-West)      ||
||  Africa (Cape Town)          ||
||  Asia Pacific (Hong Kong)    ||
||  Asia Pacific (Mumbai)       ||
||  Asia Pacific (Osaka-Local)  ||
||  Asia Pacific (Seoul)        ||
||  Asia Pacific (Singapore)    ||
||  Asia Pacific (Sydney)       ||
||  Asia Pacific (Tokyo)        ||
||  Canada (Central)            ||
||  EU (Frankfurt)              ||
||  EU (Ireland)                ||
||  EU (London)                 ||
||  EU (Milan)                  ||
||  EU (Paris)                  ||
||  EU (Stockholm)              ||
||  Middle East (Bahrain)       ||
||  South America (Sao Paulo)   ||
||  US East (N. Virginia)       ||
||  US East (Ohio)              ||
||  US West (Los Angeles)       ||
||  US West (N. California)     ||
||  US West (Oregon)            ||
|+------------------------------+|

Steps to reproduce the issue:
run cloudinfo with AWS enabled

Additional context
Tested on latest tagged 0.15.0

@bandesz bandesz mentioned this issue Aug 5, 2020
@sagikazarmark
Copy link
Member

I might be mistaken, but we got bitten by this a while ago, and the SDK upgrade seemingly solved the issue. Did AWS change it back?

@sagikazarmark sagikazarmark added the kind/bug Something isn't working label Aug 5, 2020
@mrsheepuk
Copy link
Contributor Author

I might be mistaken, but we got bitten by this a while ago, and the SDK upgrade seemingly solved the issue. Did AWS change it back?

I wouldn't be surprised! It'll probably change at some point again.

mumbles something about bloody brexit breaking everything

Thanks for the super-quick fix!

@sagikazarmark
Copy link
Member

mumbles something about bloody brexit breaking everything

🤣

Yeah, I'll try to add a fix that supports both versions.

Thanks for the super-quick fix!

As part of the release process I'll deploy it to our test env, test it there and then tag 0.15.1 if it works well.

@sagikazarmark
Copy link
Member

sagikazarmark commented Aug 5, 2020

See #367

@mrsheepuk
Copy link
Contributor Author

My reading of the filter spec for the pricing API is that the filters are ANDed, so trying to make it support both could be tricky - I guess calling with one filter then if nothing is returned, calling with the other would solve it.

... while I was typing this, I see you've put the same concept in #367 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants