Bug 1410013
| Summary: | Failed to create external load balancer with OpenStack LbaaS v2 | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Gan Huang <ghuang> |
| Component: | Node | Assignee: | Maru Newby <mnewby> |
| Status: | CLOSED NOTABUG | QA Contact: | DeShuai Ma <dma> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.4.0 | CC: | aos-bugs, decarr, eparis, ghuang, jokerman, mmccomas, wmeng |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-02-01 19:03:05 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
The error in question suggests that Openshift is attempting to use the LBaaS v1 client to access the v2 API. 'lb_method' is a parameter used by the V1 API and would be rejected with the reported error if submitted to the V2 API. Please check the openshift master logs for 'Using LBaaS extension' to determine which version is being used. If the wrong version was autodetected, try specifying the lbaas version by adding 'lb-version = v2' in the [LoadBalancer] section of openstack.conf. It would also be helpful to know which version of openstack is involved. ping Gan Huang. Any update? Seen from the log, OpenShift is already using V2 api # grep "Using LBaaS extension" /var/log/messages Feb 1 01:48:51 host-192-168-1-152 atomic-openshift-master: I0201 01:48:51.527975 15113 openstack.go:410] Using LBaaS extension v2 The OpenStack version is OSP9 Looks like the configuration about OpenStack lbaas v2 is wrong. # neutron lbaas-pool-create --name test-lb-pool-http --lb-algorithm ROUND_ROBIN --listener test-lb-http --protocol HTTP Failed to parse request. Required attribute 'lb_method' not specified Neutron server returns request_ids: ['req-ab8ec68c-4ac7-46f4-ba70-faa55bfe51b8'] I'll try again after lbaas v2 is configured correctly. Thanks for your patience. (In reply to Gan Huang from comment #4) > Seen from the log, OpenShift is already using V2 api > > # grep "Using LBaaS extension" /var/log/messages > Feb 1 01:48:51 host-192-168-1-152 atomic-openshift-master: I0201 > 01:48:51.527975 15113 openstack.go:410] Using LBaaS extension v2 > > The OpenStack version is OSP9 > > Looks like the configuration about OpenStack lbaas v2 is wrong. > > # neutron lbaas-pool-create --name test-lb-pool-http --lb-algorithm > ROUND_ROBIN --listener test-lb-http --protocol HTTP > Failed to parse request. Required attribute 'lb_method' not specified > Neutron server returns request_ids: > ['req-ab8ec68c-4ac7-46f4-ba70-faa55bfe51b8'] Ah, I misread the message from your original description. Openshift is using the v2 api but the v1 api is being targeted. Either openstack will need to be configured to expose the v2 api, or 'lb-version = v1' will need to be set in openstack.conf. I am closing this bug as it appears to be a configuration issue with OpenStack, and not an issue with OpenShift. Please re-open if you continue to have problems after having a proper configuration. |
Description of problem: Failed to create external load balancer with OpenStack LbaaS v2 Version-Release number of selected component (if applicable): openshift v3.4.0.38 How reproducible: always Steps to Reproduce: 1. Install OCP on OpenStack where LbaaS v2 is enabled. 2. Create pod 3. Create loadbalancer #oc create service loadbalancer my-lbs --tcp=5678:8080 Actual results: # oc describe svc my-lbs Name: my-lbs Namespace: default Labels: app=my-lbs Selector: app=my-lbs Type: LoadBalancer IP: 172.30.59.51 Port: 5678-8080 5678/TCP NodePort: 5678-8080 30172/TCP Endpoints: <none> Session Affinity: None Events: FirstSeen LastSeen Count From SubobjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 21s 7s 2 {service-controller } Normal CreatingLoadBalancer Creating load balancer 14s 1s 2 {service-controller } Warning CreatingLoadBalancerFailed Error creating load balancer (will retry): Failed to create load balancer for service default/my-lbs: Expected HTTP response code [201 202] when accessing [POST http://10.x.x.x:9696/v2.0/lbaas/pools], but got 400 instead {"NeutronError": {"message": "Failed to parse request. Required attribute 'lb_method' not specified", "type": "HTTPBadRequest", "detail": ""}} Expected results: Additional info: The configurations about cloudprovider # cat /etc/origin/cloudprovider/openstack.conf [Global] auth-url = http://10.x.x.x:5000/v2.0/ username = test password = test tenant-id = 640d994684f3480baf62328d55de6ae7 region = RegionOne [LoadBalancer] subnet-id = 6111d628-e075-4091-9f1b-f41c581714cb