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

Load Balancer uses wrong attribute for flavor. #1743

Closed
kmbulebu opened this issue Oct 14, 2019 · 1 comment
Closed

Load Balancer uses wrong attribute for flavor. #1743

kmbulebu opened this issue Oct 14, 2019 · 1 comment

Comments

@kmbulebu
Copy link
Contributor

When creating a load balancer, the request will fail if a flavor is specified. Checking the code against the api documentation for Octavia and Neutron, I see that flavor is being used in gophercloud, where the API requires an attribute named flavor_id. I suspect this wasn't discovered as this is a fairly obscure feature.

Debug output from Terraform:

Error: Error creating LoadBalancer: Bad request with: [POST https://openstack-test.bbtnet.com:9696/v2.0/lbaas/loadbalancers], error message: {"NeutronError": {"message": "Unrecognized attribute(s) 'flavor'", "type": "HTTPBadRequest", "detail": ""}}

Octavia Source: https://github.com/openstack/octavia/blob/master/octavia/api/v2/types/load_balancer.py#L55
Octavia API Ref: https://docs.openstack.org/api-ref/load-balancer/v2/?expanded=create-a-load-balancer-detail#create-a-load-balancer

Neutron LBaaSv2 Source: https://review.opendev.org/gitweb?p=openstack/neutron-lbaas.git;a=blob;f=neutron_lbaas/services/loadbalancer/data_models.py;h=d44cc8dd5d543af9ffacb7bc1954f332083fdc67;hb=refs/heads/stable/rocky#l724
Neutron LBaaSv2 API Ref: https://docs.openstack.org/api-ref/network/v2/#load-balancer-as-a-service-2-0-deprecated (docs page currently broken)

I will submit a PR.

@jtopjian
Copy link
Contributor

Fixed in #1744

kmbulebu added a commit to kmbulebu/terraform-provider-openstack that referenced this issue Oct 16, 2019
Incorporates gophercloud upstream fix.

gophercloud/gophercloud#1743

The openstack_lb_loadbalancer_v2 flavor attribute is now
`flavor_id` to match the Neutron LBaaSv2 and Octavia
api attribute.
ozerovandrei pushed a commit to terraform-provider-openstack/terraform-provider-openstack that referenced this issue Oct 19, 2019
Incorporates gophercloud upstream fix.

gophercloud/gophercloud#1743

The openstack_lb_loadbalancer_v2 flavor attribute is now
`flavor_id` to match the Neutron LBaaSv2 and Octavia
api attribute.
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

No branches or pull requests

2 participants