terraform-provider-openstack icon indicating copy to clipboard operation
terraform-provider-openstack copied to clipboard

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

Open pawcykca opened this issue 2 years ago • 4 comments

Close #1102

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

pawcykca avatar Aug 23 '22 20:08 pawcykca

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 avatar Aug 29 '22 13:08 MrFreezeex

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.

MrFreezeex avatar Aug 29 '22 13:08 MrFreezeex

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 avatar Aug 30 '22 17:08 pawcykca

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 avatar Aug 30 '22 19:08 pawcykca

@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

nikParasyr avatar Sep 27 '22 14:09 nikParasyr