[JUJU-785] Update the list of known Azure instance types and cost heuristic #13862
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When selecting the Azure instance type to use, there's a fix list of instance types in relative cost order. We fix the "cheapest" that matches the constraints. There were 2 problems:
The list of instance types is updated and a logic change is made so that if we have
foo_v2
foo_v3
foo_v4
we will prefer foo_v4 all else being equal.
We could look to query an API to get true cost info but as illustrated by having to move the burstable instances types to the end of the list, cost cannot be the sole selection factor. So this change will do for now as it solves the immediate problem for the foreseeable future.
QA steps
As per bug report:
Bug reference
https://bugs.launchpad.net/juju/+bug/1965455