Unable to delete loadbalancer even in ERROR state
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
octavia |
Fix Released
|
High
|
KRISHNA MOULI. TANKALA |
Bug Description
Unable to delete loadbalancer even in ERROR state.
Octavia Load balancer is allowing to delete only in ACTIVE state, it is NOT allowing to delete it even in ERROR state.
When a load balancer is created it will go into PENDING_CREATE. after that if it is successful in spawning Amphora then it may go into ACTIVE state.
But due to some reasons like wrong subnet for amphora, or because some other network issue amphora may become unreachable to octavia controller. In such cases load balancer goes to ERROR state.
When a load balancer is in ERROR state we can issue delete of it.
stack@MouliDev:~$ neutron lbaas-loadbalan
+------
| id | name | vip_address | provisioning_status | provider |
+------
| 4d616fe9-
| 99226592-
+------
stack@MouliDev:~$ neutron lbaas-loadbalan
Deleted loadbalancer: lb2
Though it says deleted we can see error in log as below.
2016-06-21 20:06:31.016 24901 INFO octavia.
127.0.0.1 - - [21/Jun/2016 20:06:31] "DELETE /v1/loadbalance
stack@MouliDev:~$ neutron lbaas-loadbalan
+------
| id | name | vip_address | provisioning_status | provider |
+------
| 4d616fe9-
| 99226592-
+------
then load balancer will never be deleted as it is immutable in ERROR state.
after some time load balancer goes back to ERROR state again.
stack@MouliDev:~$ neutron lbaas-loadbalan
+------
| id | name | vip_address | provisioning_status | provider |
+------
| 4d616fe9-
| 99226592-
+------
Before proceeding to delete a load balancer, Octavia checks the provisioning status as below. Which allows to delete only if it is in ACTIVE state, But we should delete load balancer even if it is in ERROR state as well.
def test_and_
"""Tests and sets a load balancer and listener provisioning status.
Puts a lock on the load balancer table to check the status of a
load balancer. If the status is ACTIVE then the status of the load
balancer and listener is updated and the method returns True. If the
status is not ACTIVE, then nothing is done and False is returned.
:param session: A Sql Alchemy database session.
:param lb_id: id of Load Balancer
:param lb_prov_status: Status to set Load Balancer and Listener if
:param listener_
:param listener_ids: List of ids of a listeners (can be empty)
:returns: bool
octavia/
64
PENDING_UPDATE, DELETED, ERROR)
65
MUTABLE_STATUSES = (ACTIVE,)
66
Expected results:
User should be able to delete a load balancer when it is ERROR state.
By mistake user would have given wrong subnet which caused this issue, but user should be able to recover from his mistake.
Changed in octavia: | |
assignee: | nobody → KRISHNA MOULI. TANKALA (mouli-tankala) |
description: | updated |
Changed in octavia: | |
status: | Triaged → In Progress |
Hi, thank you for your bug report.
Can you please clarify for me. From the output included in the bug report it appears that the deleted load balancer has transitioned into the "PENDING_DELETE" state as opposed to the "ERROR" state as you mention. Did you mean that it gets stuck in "PENDING_DELETE" and cannot be deleted again?
Thanks,
Michael