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

Use highest available magnum microversion #4261

Merged
merged 1 commit into from
Aug 16, 2021

Conversation

tghartland
Copy link
Contributor

@tghartland tghartland commented Aug 13, 2021

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.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 13, 2021
Magnum allows using the microversion string "latest",
and it will replace it internally with the highest
microversion that it supports.

This will let the autoscaler use microversion 1.10 which
allows scaling groups to 0 nodes, if it is available.

The autoscaler will still be able to use microversion 1.9
on older versions of magnum.
@tghartland tghartland force-pushed the 4254-magnum-microversion branch from b1d6088 to 13cd70e Compare August 13, 2021 11:17
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 13, 2021
Copy link
Contributor

@mwielgus mwielgus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 16, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mwielgus, tghartland

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 16, 2021
@k8s-ci-robot k8s-ci-robot merged commit cac6d4b into kubernetes:master Aug 16, 2021
k8s-ci-robot added a commit that referenced this pull request Aug 25, 2021
Cherry pick #4261 (magnum microversion) to cluster-autoscaler-release-1.22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[magnum] Scaling down nodegroups to 0 requires microversion bump
3 participants