Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

unable to delete network either from Horizon, cli or mysql

In my test network, I have added couple of networks now after some weeks, Im trying to delete the network, but it doesnt get deleted i tried to delete from horizon,cli and even mysql following are the errors observed

From Horizon:

Error: Failed to delete network 16072258-01ed-49e8-80a8-1a50936fbc78

From CLI:

root@controller2:~# nova network-list
+--------------------------------------+--------+------+
| ID                                   | Label  | Cidr |
+--------------------------------------+--------+------+
| 16072258-01ed-49e8-80a8-1a50936fbc78 | Net1   | -    |
| ebd23359-487a-42ae-9dc5-bd74341714bf | ExtNet | -    |
| ee9d42c4-e546-4dd5-b85e-a0683944eb86 | net5   | -    |
+--------------------------------------+--------+------+
root@controller2:~# nova net-delete 16072258-01ed-49e8-80a8-1a50936fbc78
ERROR: <attribute 'message' of 'exceptions.BaseException' objects> (HTTP 500)

from mysql:

mysql> select * from networks;
+----------------------------------+--------------------------------------+--------+--------+----------------+--------+
| tenant_id                        | id                                   | name   | status | admin_state_up | shared |
+----------------------------------+--------------------------------------+--------+--------+----------------+--------+
| b257c28f4981423e8615638e18d7d7be | 16072258-01ed-49e8-80a8-1a50936fbc78 | Net1   | ACTIVE |              1 |      0 |
| 74b3ba883f0049ab9cd53fd0798dd2fa | ebd23359-487a-42ae-9dc5-bd74341714bf | ExtNet | ACTIVE |              1 |      0 |
| b257c28f4981423e8615638e18d7d7be | ee9d42c4-e546-4dd5-b85e-a0683944eb86 | net5   | ACTIVE |              1 |      0 |
+----------------------------------+--------------------------------------+--------+--------+----------------+--------+
3 rows in set (0.00 sec)

mysql> del
delay      delimiter
mysql> delete from networks where id = '16072258-01ed-49e8-80a8-1a50936fbc78';
ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`neutron`.`ports`, CONSTRAINT `ports_ibfk_1` FOREIGN KEY (`network_id`) REFERENCES `networks` (`id`))
mysql>

unable to delete network either from Horizon, cli or mysql

In my test network, I have added couple of networks now networks. Now after some weeks, Im trying to delete the network, but it doesnt get deleted i deleted. I tried to delete from horizon,cli and even mysql mysql. Also made sure that I have checked in VM's, firewall and subnets etc, no-where is this network associated to any VM or router. I just want to delete this stale network object, any help is much appreciated following are the errors observed

From Horizon:

Error: Failed to delete network 16072258-01ed-49e8-80a8-1a50936fbc78

From CLI:

root@controller2:~# nova network-list
+--------------------------------------+--------+------+
| ID                                   | Label  | Cidr |
+--------------------------------------+--------+------+
| 16072258-01ed-49e8-80a8-1a50936fbc78 | Net1   | -    |
| ebd23359-487a-42ae-9dc5-bd74341714bf | ExtNet | -    |
| ee9d42c4-e546-4dd5-b85e-a0683944eb86 | net5   | -    |
+--------------------------------------+--------+------+
root@controller2:~# nova net-delete 16072258-01ed-49e8-80a8-1a50936fbc78
ERROR: <attribute 'message' of 'exceptions.BaseException' objects> (HTTP 500)

from mysql:

mysql> select * from networks;
+----------------------------------+--------------------------------------+--------+--------+----------------+--------+
| tenant_id                        | id                                   | name   | status | admin_state_up | shared |
+----------------------------------+--------------------------------------+--------+--------+----------------+--------+
| b257c28f4981423e8615638e18d7d7be | 16072258-01ed-49e8-80a8-1a50936fbc78 | Net1   | ACTIVE |              1 |      0 |
| 74b3ba883f0049ab9cd53fd0798dd2fa | ebd23359-487a-42ae-9dc5-bd74341714bf | ExtNet | ACTIVE |              1 |      0 |
| b257c28f4981423e8615638e18d7d7be | ee9d42c4-e546-4dd5-b85e-a0683944eb86 | net5   | ACTIVE |              1 |      0 |
+----------------------------------+--------------------------------------+--------+--------+----------------+--------+
3 rows in set (0.00 sec)

mysql> del
delay      delimiter
mysql> delete from networks where id = '16072258-01ed-49e8-80a8-1a50936fbc78';
ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`neutron`.`ports`, CONSTRAINT `ports_ibfk_1` FOREIGN KEY (`network_id`) REFERENCES `networks` (`id`))
mysql>