Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Add a method to filter unsupported instance types #6958
Conversation
|
!!build!! |
|
!!baronbomburst!! |
babbageclunk
approved these changes
Feb 9, 2017
Looks good - I guess if there were more overrides we could pull them from a file. Weird that there's no way to determine this from the data. Do they expect people to try to launch them and just fail?
| @@ -73,7 +73,7 @@ func Main() (int, error) { | ||
| defer fout.Close() | ||
| } | ||
| - tmpl, err := template.New("instanceTypes").Parse(` | ||
| + tmpl := template.Must(template.New("instanceTypes").Parse(` |
| +// See: https://bugs.launchpad.net/juju/+bug/1663047 | ||
| +func supported(region, instanceType string) bool { | ||
| + switch region { | ||
| + case "ap-northeast-2": |
babbageclunk
Feb 9, 2017
Member
There's no way in the offer list data to see that these aren't actually available?
reedobrien
Feb 9, 2017
Contributor
Correct. They are listed with prices in the offer list, but if you try to launch one, it fails with an unsupported error.
reedobrien
Feb 9, 2017
Contributor
Sadly there's no API to ask what instance types are available in a region. Which has been a requested API since 2012 at least.
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
reedobrien commentedFeb 9, 2017
Description of change
This PR adds a method to filter out unstupported instance types. At least where we know they are unsupported but still in the offer list.
Why is this change needed?
Trying to deploy to a region that has types listed but not available results in failed deployments.
QA steps
How do we verify that the change works?
It should work.
Documentation changes
N/A
Does it affect current user workflow? CLI? API?
N/A
Bug reference
Refs: https://bugs.launchpad.net/juju/+bug/1663047