Ask Your Question
0

unable to delete network either from Horizon, cli or mysql

asked 2014-07-15 02:05:50 -0500

ramprasvm gravatar image

updated 2014-07-15 02:15:06 -0500

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. 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>
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-07-17 06:07:36 -0500

ramprasvm gravatar image

updated 2014-07-17 06:23:18 -0500

SGPJ gravatar image

with the inputs of SGPJ
I figured out any associations to the network
I figured out that its associated somewhere in a loadbalance configuration
removed the configuration manually and now able to delete the network

edit flag offensive delete link more
1

answered 2014-07-15 02:09:04 -0500

SGPJ gravatar image

updated 2014-07-17 06:24:12 -0500

Check any router or VM is associated with the network or any old configurations. If so delete them first and then try to delete network using dashboard.

edit flag offensive delete link more

Comments

Good step and this will help others with similar issues. Thanks for posting.

SGPJ gravatar imageSGPJ ( 2014-07-17 06:21:15 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-07-15 02:05:50 -0500

Seen: 2,341 times

Last updated: Jul 17 '14