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

Fix update of node_count field for containerinfra_cluster_v1 resource and {min,max}_node_count fields for containerinfra_nodegroup_v1 resource #1431

Conversation

pawcykca
Copy link
Contributor

Close #1102

This PR should allow users to update node_count of cluster resource.

@MrFreezeex
Copy link
Contributor

MrFreezeex commented Aug 29, 2022

Hmm on our OpenStack cluster changing the number of nodes was working fine (IIRC our magnum is running train version). Maybe magnum changed something in the API...

@MrFreezeex
Copy link
Contributor

I am guessing that if this is the right fix, it would also applies to {min,max}_node_count on the nodegroup resource as well.

@pawcykca
Copy link
Contributor Author

Hmm on our OpenStack cluster changing the number of nodes was working fine (IIRC our magnum is running train version). Maybe magnum changed something in the API...

I'm testing this feature on Openstack Ussuri.

Based on official API reference, samples and source code (for both Train and Ussuri releases) the value of node_count parameter should be int, not string:
https://github.com/openstack/magnum/blob/stable/ussuri/api-ref/source/clusters.inc#update-information-of-cluster
https://github.com/openstack/magnum/blob/stable/ussuri/magnum/api/controllers/v1/cluster.py#L106

@pawcykca
Copy link
Contributor Author

pawcykca commented Aug 30, 2022

I am guessing that if this is the right fix, it would also applies to {min,max}_node_count on the nodegroup resource as well.

That's true.
I have also fixed this resource in case of {min,max}_node_count update.
In addition I also fixed max_node_count deletion.

@pawcykca pawcykca changed the title Fix update of node_count field for containerinfra_cluster_resource Fix update of node_count field for containerinfra_cluster_v1 resource and {min,max}_node_count fields for containerinfra_nodegroup_v1 resource Aug 31, 2022
@nikParasyr
Copy link
Member

@ozerovandrei Can you have a look into this as well? Unfortunately i have not gotten the ci to work magnum yet.
From my side and with the provided links, this looks ok, but i dont have any environment to actually test it

Copy link
Member

@ozerovandrei ozerovandrei left a comment

Choose a reason for hiding this comment

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

I also don't have a Magnum environment currently but LGTM

@nikParasyr nikParasyr merged commit c18dd8a into terraform-provider-openstack:main Oct 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Two obvious bugs about openstack_containerinfra
4 participants