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

[magnum] Scaling down nodegroups to 0 requires microversion bump #4254

Closed
kklimonda opened this issue Aug 11, 2021 · 1 comment · Fixed by #4261
Closed

[magnum] Scaling down nodegroups to 0 requires microversion bump #4254

kklimonda opened this issue Aug 11, 2021 · 1 comment · Fixed by #4261
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@kklimonda
Copy link

Which component are you using?: autoscaler with magnum

What version of the component are you using?: v1.22.0

Component version:

What k8s version are you using (kubectl version)?: 1.21.1

kubectl version Output
$ kubectl version

What environment is this in?: testing with magnum from wallaby openstack release

What did you expect to happen?: when nodegroup has min_node_count set to 0, autoscaler should be able to remove all nodes from the group properly.

What happened instead?: even with 1.22.0 release, which adds support for empty nodegroups, scaling down fails due to microversion mismatch:
E0811 10:55:11.158565 1 scale_down.go:1146] Problem with empty node deletion: failed to delete processing-tests-processin-3pxorznq65oy-node-0: manager error deleting nodes: could not resize cluster: Bad request with: [POST http://ctrl:9511/v1/clusters/23d8d1c6-d713-47ff-92f1-471092b96a7d/actions/resize], error message: {"errors": [{"request_id": "", "code": "client", "status": 400, "title": "Resizing a nodegroup to zero is not supported in the provided microversion", "detail": "Resizing a nodegroup to zero is not supported in the provided microversion.", "links": []}]}

According to https://github.com/openstack/magnum/blob/master/magnum/api/rest_api_version_history.rst empty nodegroups are supported with 1.10+ microapi version.

How to reproduce it (as minimally and precisely as possible): Create

Anything else we need to know?:

@kklimonda kklimonda added the kind/bug Categorizes issue or PR as related to a bug. label Aug 11, 2021
@tghartland
Copy link
Contributor

Thanks for reporting.

You're correct that microversion 1.10 was added for node groups of size 0, but when it was added, using that microversion wasn't required for the node group resize operation.
I missed updating the microversion that the autoscaler uses when I enabled scale to zero, which is why it fails now.

I've created a pull request to change it to always use the latest microversion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants