Closed alonsocamaro closed 7 years ago
Don't you find the same behavior when you use the default LBaaS? I believe this is just the way Openstack wants you to delete the objects.
Probably this is not something F5 specific but... I don't know...
Let's ask the question in a different way....
why the pool is not deleted in the first place when it is supposed to be deleted successfully?
I have Mitaka running now with the 9.0.3 agent.
Here is a load balancer:
[root@server1 ~(keystone_admin)]# neutron lbaas-loadbalancer-show 330e0398-0d27-4042-a558-ba100f417274 +---------------------+------------------------------------------------+ | Field | Value | +---------------------+------------------------------------------------+ | admin_state_up | True | | description | | | id | 330e0398-0d27-4042-a558-ba100f417274 | | listeners | {"id": "169927e3-cf4d-4942-a063-0b98ddcbe75d"} | | name | lb1 | | operating_status | ONLINE | | pools | {"id": "944645ba-d919-4b17-bd96-38d46ba3061b"} | | provider | f5networks | | provisioning_status | ACTIVE | | tenant_id | 5ca8171d93b743f9a776d54f440d8f40 | | vip_address | 10.22.0.19 | | vip_port_id | 07763244-8016-4fcc-8efe-7f896796fb71 | | vip_subnet_id | a3e2e6c7-6050-409a-9ead-61239153cb23 | +---------------------+------------------------------------------------+
To delete this, you must delete the pool, then the listener, then the load balancer object.
[root@server1 ~(keystone_admin)]# neutron lbaas-pool-delete 944645ba-d919-4b17-bd96-38d46ba3061b Deleted pool: 944645ba-d919-4b17-bd96-38d46ba3061b
[root@server1 ~(keystone_admin)]# neutron lbaas-listener-delete 169927e3-cf4d-4942-a063-0b98ddcbe75d Deleted listener: 169927e3-cf4d-4942-a063-0b98ddcbe75d
[root@server1 ~(keystone_admin)]# neutron lbaas-loadbalancer-delete lb1 Deleted loadbalancer: lb1
Yes, I'm aware of the right order on how to delete things.
I have been able to delete all load balancers I have created with the exception of this one I point above. Please note that the problem is that the pool member is not really being deleted.
Could you please take a second look to this?
Thanks
Ulises
I have exactly the same problem but I did not notice this for at least a week so right now I can't remember how I got there. I will try to reproduce this again.
I've had similar issues, I opened a similar issue here: https://github.com/F5Networks/f5-openstack-lbaasv2-driver/issues/254
My workaround was to use the mysql client.
With respect of the workaround published in https://github.com/F5Networks/f5-openstack-agent/issues/393 it didn't work for me straight away:
mysql> describe lbaas_pools;
+---------------------+-----------------------------------------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------------+-----------------------------------------------------+------+-----+---------+-------+
| tenant_id | varchar(255) | YES | MUL | NULL | |
| id | varchar(36) | NO | PRI | NULL | |
| name | varchar(255) | YES | | NULL | |
| description | varchar(255) | YES | | NULL | |
| protocol | enum('HTTP','HTTPS','TCP') | NO | | NULL | |
| lb_algorithm | enum('ROUND_ROBIN','LEAST_CONNECTIONS','SOURCE_IP') | NO | | NULL | |
| healthmonitor_id | varchar(36) | YES | UNI | NULL | |
| admin_state_up | tinyint(1) | NO | | NULL | |
| provisioning_status | varchar(16) | NO | | NULL | |
| operating_status | varchar(16) | NO | | NULL | |
| loadbalancer_id | varchar(36) | YES | MUL | NULL | |
+---------------------+-----------------------------------------------------+------+-----+---------+-------+
11 rows in set (0.04 sec)
mysql> select * from lbaas_pools;
+----------------------------------+--------------------------------------+---------+-------------+----------+--------------+------------------+----------------+---------------------+------------------+--------------------------------------+
| tenant_id | id | name | description | protocol | lb_algorithm | healthmonitor_id | admin_state_up | provisioning_status | operating_status | loadbalancer_id |
+----------------------------------+--------------------------------------+---------+-------------+----------+--------------+------------------+----------------+---------------------+------------------+--------------------------------------+
| 8e9b22cab67040689dcf86f74275a911 | df0ac5b0-47ee-4f55-b5af-d442be69e4b2 | test190 | | HTTP | ROUND_ROBIN | NULL | 1 | PENDING_DELETE | ONLINE | 44649dbb-741c-4003-9512-45122f84291d |
+----------------------------------+--------------------------------------+---------+-------------+----------+--------------+------------------+----------------+---------------------+------------------+--------------------------------------+
1 row in set (0.00 sec)
mysql> delete from lbaas_pools where id="df0ac5b0-47ee-4f55-b5af-d442be69e4b2";
ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`neutron`.`lbaas_members`, CONSTRAINT `lbaas_members_ibfk_1` FOREIGN KEY (`pool_id`) REFERENCES `lbaas_pools` (`id`))
With the following trick I could get rid of the row / the pool
mysql> SET FOREIGN_KEY_CHECKS=0;
Query OK, 0 rows affected (0.02 sec)
mysql> delete from lbaas_pools where id="df0ac5b0-47ee-4f55-b5af-d442be69e4b2";
Query OK, 1 row affected (0.01 sec)
Issue resolved by merge #448
OpenStack Release
Mitaka
Description
Hi all
I'm unable to delete a loadbalancer because a pool is using it but even after deleting the pool I cannot delete the loadbalancer anyway
Ultimately it seems that it is because the member of the pool is not really deleted
Am I doing anything wrong or is it this something should be investigated?
Thanks
Agent Version
9.0.2
Operating System
Mirantis 9