Able to create pool with different protocol than listener protocol
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
octavia |
Fix Released
|
Low
|
xuchaochao |
Bug Description
When creating a pool with different protocol than listener protocol, a pool is create even though the protocols are not compatible.
Previously, this would not display any pools in neutron lbaas-pool-list since the protocols are not compatible.
Initial state
$ neutron lbaas-loadbalan
+------
| id | name | vip_address | provisioning_status | provider |
+------
| bf449f65-
| c6bf0765-
| e1210b03-
+------
$ neutron lbaas-listener-list
+------
| id | default_pool_id | name | protocol | protocol_port | admin_state_up |
+------
| 4cda881c-
+------
$ neutron lbaas-pool-list
+------
| id | name | protocol | admin_state_up |
+------
| 6be3dae1-
+------
Create new listener with TCP protocol
$ neutron lbaas-listener-
Created a new listener:
+------
| Field | Value |
+------
| admin_state_up | True |
| connection_limit | -1 |
| default_pool_id | |
| default_
| description | |
| id | 9574801a-
| loadbalancers | {"id": "e1210b03-
| name | list3 |
| protocol | TCP |
| protocol_port | 22 |
| sni_container_refs | |
| tenant_id | b24968d717804ff
+------
Create pool with HTTP protocol instead of TCP
$ neutron lbaas-pool-create --name pool3 --lb-algorithm ROUND_ROBIN --listener list3 --protocol HTTP
Listener protocol TCP and pool protocol HTTP are not compatible.
Pool list shows pool3 even though the protocols are not compatible and should not be able to create pool
$ neutron lbaas-pool-list
+------
| id | name | protocol | admin_state_up |
+------
| 6be3dae1-
| 7e6fbe67-
+------
From mysql, pool table from octavia DB. No pool3
+------
| project_id | id | name | description | protocol | lb_algorithm | operating_status | enabled | load_balancer_id |
+------
| b24968d7-
+------
From mysql, lbaas_pools table from neutron DB. Pool3 is in PENDING_CREATE.
+------
| tenant_id | id | name | description | protocol | lb_algorithm | healthmonitor_id | admin_state_up | provisioning_status | operating_status | loadbalancer_id |
+------
| b24968d717804ff
| b24968d717804ff
+------
Changed in neutron: | |
status: | New → Confirmed |
importance: | Undecided → Low |
tags: | added: low-hanging-fruit |
Changed in neutron: | |
assignee: | nobody → j_king (james-agentultra) |
Changed in neutron: | |
status: | In Progress → Fix Committed |
status: | Fix Committed → In Progress |
Changed in neutron: | |
status: | In Progress → Incomplete |
assignee: | j_king (james-agentultra) → nobody |
Changed in neutron: | |
assignee: | nobody → xuchaochao (xuchaochao) |
status: | Expired → In Progress |
affects: | neutron → octavia |
When I run through this scenario: cer-create --name act-stby-rr-1 private-subnet create --name listener1 --loadbalancer act-stby-rr-1 --protocol TCP --protocol-port 80
neutron lbaas-loadbalan
neutron lbaas-listener-
neutron lbaas-pool-create --name pool1 --lb-algorithm ROUND_ROBIN --listener listener1 --protocol HTTP
I get the expected response: a24b-4be5- a1f2-357eeafbc3 e7']
Listener protocol TCP and pool protocol HTTP are not compatible.
Neutron server returns request_ids: ['req-f1e015da-
I see no record of the pool in the Octavia DB as would be expected.
However, I see a record remains in the neutron database:
| tenant_id | id | name | description | protocol | lb_algorithm | healthmonitor_id | admin_state_up | provisioning_status | operating_status | loadbalancer_id | ------- ------- ------- ------- +------ ------- ------- ------- ------- ----+-- -----+- ------- -----+- ------- --+---- ------- ---+--- ------- ------- -+----- ------- ----+-- ------- ------- -----+- ------- ------- ---+--- ------- ------- ------- ------- ------- + c8f37f4373f76fd ec | f2cf6444- 71a6-4978- a583-6228599764 51 | pool1 | | HTTP | ROUND_ROBIN | NULL | 1 | PENDING_CREATE | OFFLINE | f2b1116a- babd-4355- 88ba-81b600885b 31 |
+------
| 3acdd9326b514a7
This appears to be a neutron-lbaas bug, assigning to neutron-lbaas.