Use highest available magnum microversion #4261
Merged
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.
Fixes #4254
When I enabled scale to 0 for the magnum provider, I was looking at this patch which allows node groups of size 0 with a new microversion, but did not require the microversion for making resize requests.
https://opendev.org/openstack/magnum/commit/f46923cc5ea74da663640bb0c470a4b1039c777e
The microversion requirement for resizing to 0 was added separately, later on.
https://opendev.org/openstack/magnum/commit/0e6d178939647e61fee1485e7b3611f093adb7c6
This patch makes the magnum client send "latest" as its microversion request, and on the server side magnum will replace it with the highest microversion that it supports.
When microversion 1.10 (or higher) is available, it will be used which allows the autoscaler to scale node groups to 0.
On magnum versions older than Wallaby, microversion 1.9 will still be used.
Attempting to scale to 0 would be an error, but magnum will also not allow the minimum node count of a group to be set to 0, so as long as node group autodiscovery is used then that error will never occur.