OpenStack senlin cannot create a loadbalance listener by openstack sdk
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack SDK |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
cannot create a listener by openstack sdk when I attach lbaas policy to a cluster in senlin.
The openstacksdk version is 0.9.17
Example one:
lb_policy.yaml:
type: senlin.
version: 1.1
properties:
pool:
protocol: HTTP
protocol_port: 80
subnet: public-subnet
lb_method: ROUND_ROBIN
admin_state_up: true
session_
type: HTTP_COOKIE
cookie_name: my_cookie
vip:
subnet: public-subnet
address: 192.168.6.110
connection_
protocol: HTTP
protocol_port: 80
admin_state_up: true
health_monitor:
type: HTTP
delay: 20
timeout: 5
max_retries: 3
admin_state_up: true
http_method: GET
url_path: /health
expected_codes: 200
lb_status_
[stack@yutingting v2]$ openstack cluster policy create --spec-file lb_policy.yaml lb01
[stack@yutingting v2]$ openstack cluster policy attach --enabled True --policy lb01 mycluster
2017-08-04 16:22:19.758 ERROR senlin.
2017-08-04 16:22:19.758 TRACE senlin.
2017-08-04 16:22:19.758 TRACE senlin.
2017-08-04 16:22:19.758 TRACE senlin.
2017-08-04 16:22:19.758 TRACE senlin.
2017-08-04 16:22:19.758 TRACE senlin.
2017-08-04 16:22:19.758 TRACE senlin.
2017-08-04 16:22:19.758 TRACE senlin.
2017-08-04 16:22:19.758 TRACE senlin.
2017-08-04 16:22:19.758 TRACE senlin.
2017-08-04 16:22:19.758 TRACE senlin.
2017-08-04 16:22:19.758 TRACE senlin.
2017-08-04 16:22:19.758 TRACE senlin.
2017-08-04 16:22:19.758 TRACE senlin.
2017-08-04 16:22:19.758 TRACE senlin.
2017-08-04 16:22:19.758 TRACE senlin.
2017-08-04 16:22:19.758 TRACE senlin.
But the loadbalancer is created,I can see the loadbalancer in neutron
[stack@yutingting senlin]$ neutron lbaas-loadbalan
+------
| id | name | vip_address | provisioning_status | provider |
+------
| 668339db-
| 8487f860-
| f1d35284-
+------
Example two:
Then I write a test case by openstacksdk documention to test the sdk.,It's also has this problem.
test_sdk.py
from openstack import connection
from openstack import profile
def create_
prof = profile.Profile()
prof.
return connection.
)
def create_listener():
conn = create_connection('http://
kwargs = {
}
try:
res = conn.network.
print 'yes'
except Exception as e:
print e
create_listener()
[root@yutingting mypro]# python test_sdk.py
HttpException: Bad Request (HTTP 400) (Request-ID: req-bc082b09-
Then I modify the 'loadbalancer_id' to 'loadbalancers'
[root@yutingting mypro]# python test_sdk.py
HttpException: Bad Request (HTTP 400) (Request-ID: req-77b3472e-
summary: |
- cannot create a listener by openstack sdk + cannot create a loadbalance listener by openstack sdk |
summary: |
- cannot create a loadbalance listener by openstack sdk + OpenStack senlin cannot create a loadbalance listener by openstack sdk |
description: | updated |
there is a patch that try to fix the issue: https:/ /review. openstack. org/#/c/ 493449/