ContainerInfra: nodegroups Get #1774
Conversation
|
Build succeeded.
|
|
I have added acceptance tests for Get/List, but in my devstack environment I had to make a change in the general cluster setup here to add three := 3
createOpts := clustertemplates.CreateOpts{
DockerVolumeSize := &three,otherwise I would get the error I don't know if this is specific to my devstack or not. @jtopjian do the containerinfra acceptance tests not run in the openlab testing? I don't see them in the logs/results. |
|
No this is the same on our production stein deployment. It's only a problem when using the devicemapper storage driver, setting docker_storage_driver to overlayfs allows the volume size to be unset. I think this needs a separate fix to the acceptance test to set the volume size, as long as it doesn't break anything else in the testing environment. |
|
Build failed.
|
|
The issue with the storagedriver was part of a larger problem, that moving on to the Create acceptance tests helped me figure out. To begin with, the docker swarm template that is created here is not compatible for using node groups with (the full functionality of node groups requires a kubernetes cluster). Since the node group tests will have to create their own template using kubernetes anyway, that template can use overlay2 as the storage driver which fixes that issue. There was also a problem with the template dns_nameserver which was preventing nodes from starting in our environment. I'm running with it pointing to our internal DNS for now and I'll leave it as 8.8.8.8 when I push the code here. Next was an issue with timeouts. The acceptance tests for containerinfra/v1/clusters do not check this error here but since I had added an assert for this error in the node group tests I was seeing a time out from the WaitFor function that it uses after creating the cluster, which has a hard-coded timeout of 300 seconds gophercloud/acceptance/tools/tools.go Lines 16 to 18 in bee6224 (this means that the containerinfra/v1/clusters tests start running on a cluster that is still in CREATE_IN_PROGRESS if the 300 second timeout is reached). Cluster creation of a kubernetes cluster takes ~500 seconds in my devstack, so I have also had to duplicate the cluster creation function. In this I will manually loop and check the status instead of using tools.WaitFor so that I can extend the timeout. I'll move the cluster and cluster template changes back from my Create branch to this one once I've made sure that everything is working properly. |
|
@tghartland Thank you for all of the work investigating these issues. Please feel free to update anything you see as needing fixed. |
75da650 to
1426fa8
Compare
|
Acceptance test updated to use its own createTemplate and createCluster functions. |
|
Build succeeded.
|
|
@jtopjian I've finished the acceptance tests for create/update/delete and there's nothing else that would need to be propagated back to here, so it's ready for review. |
|
@tghartland Thanks! I'm going to see about getting Magnum/ContainerInfra re-enabled in OpenLab so we can have these tested regularly. I might need you to rebase this if I'm able to get that working. |
|
I know OpenLab has a 3 hour global time limit set. I'll look at increasing the individual test timeout for the Magnum tests - thanks for the heads up. And just to confirm: did you have to make any changes to the devstack environment or are the tests able to run in a "vanilla" environment? |
|
There aren't any major changes, the only thing that might be an issue is that the devstack I'm using is a little out of date It also has this fix which isn't merged yet but the List tests don't use any paginated responses so that shouldn't be a problem. |
jtopjian
left a comment
There was a problem hiding this comment.
@tghartland I apologize for the delay. It looks like OpenLab needs to amend their jobs to have Magnum run in the tests, so I've opened an issue for this. As for testing locally, I'm a little pressed for time and haven't been able to verify it on my own, but I'll assume it works and we/I can sort out any issues once it's enabled in OpenLab later.
Overall this looks good. The comments I've left are just minor items. Please let me know if you have any questions.
1426fa8 to
f17b169
Compare
|
Build failed.
|
For #1767
NodeGroup API representation:
https://github.com/openstack/magnum/blob/9c7cf5d6eb050dbbcdcb036bd0af2b6586070c0c/magnum/api/controllers/v1/nodegroup.py#L58-L127
List method:
https://github.com/openstack/magnum/blob/9c7cf5d6eb050dbbcdcb036bd0af2b6586070c0c/magnum/api/controllers/v1/nodegroup.py#L226-L262
Get method:
https://github.com/openstack/magnum/blob/9c7cf5d6eb050dbbcdcb036bd0af2b6586070c0c/magnum/api/controllers/v1/nodegroup.py#L265-L280
Waiting on https://review.opendev.org/#/c/694230/ to be merged to fix listing with limited number of results per page.