Ask Your Question
1

Can't delete image in nova

asked 2014-06-09 14:51:24 -0500

danoreilly gravatar image

updated 2014-06-11 15:21:58 -0500

rbowen gravatar image

I created a test image then asked it to terminate, and it won't go away. The current status is:

# nova list
+--------------------------------------+----------------+--------+------------+-------------+----------+
| ID                                   | Name           | Status | Task State | Power State | Networks |
+--------------------------------------+----------------+--------+------------+-------------+----------+
| d45b061e-31cb-4a92-ab00-adce44480f75 | demo-instance1 | BUILD  | deleting   | NOSTATE     |          |
+--------------------------------------+----------------+--------+------------+-------------+----------+

Any ideas you can supply or logs I can provide? It's been in this state for over an hour.

edit retag flag offensive close merge delete

Comments

nova logs would be good to look at, for instance. Edit the question adding details while you debug so others can get ideas of things you've already tried

smaffulli gravatar imagesmaffulli ( 2014-06-09 16:48:48 -0500 )edit

you can delete it from mysql manually

kobo gravatar imagekobo ( 2014-06-12 04:34:22 -0500 )edit

Search the bugs too because IIRC there is a known issue sometime with nova not deleting instances. https://bugs.launchpad.net/nova/+bug/...

smaffulli gravatar imagesmaffulli ( 2014-06-13 17:53:57 -0500 )edit

How can I delete it manually?

danoreilly gravatar imagedanoreilly ( 2014-06-17 08:39:09 -0500 )edit

try on the compute
service openstack-nova-compute restart
and then check on the controller
nova list

kobo gravatar imagekobo ( 2014-06-19 11:02:27 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
2

answered 2014-06-12 08:18:11 -0500

updated 2014-06-12 08:18:28 -0500

try setting VM state to active, then removing it:

nova reset-state --active <VM-ID>
nova delete <VM-ID>
edit flag offensive delete link more

Comments

nope. it goes into "active" state, but still shows "deleting" and is just hanging there.

danoreilly gravatar imagedanoreilly ( 2014-06-12 12:11:44 -0500 )edit

Thanks a lot Antonio! I first have rebooted my controller then afterwards applied your suggestion, then it worked.

eyuep.yueksel gravatar imageeyuep.yueksel ( 2014-10-24 10:13:33 -0500 )edit
1

answered 2014-06-17 14:03:30 -0500

kobo gravatar image

connect to mysql
root@controller-node ~]# mysql

choose the database
mysql> use nova;

delete the instance
mysql> delete from instances where id='d45b061e-31cb-4a92-ab00-adce44480f75';

edit flag offensive delete link more

Comments

mysql> delete from instances; ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (nova.block_device_mapping, CONSTRAINT block_device_mapping_instance_uuid_fkey FOREIGN KEY (instance_uuid) REFERENCES instances (uuid))

Any ideas?

danoreilly gravatar imagedanoreilly ( 2014-06-17 16:47:08 -0500 )edit

danoreilly, Check nova services are running fine by $nova service-list . It is better not to remove the instance from the database, Check mysql, qpidd services are running. If everything is running, reset instance and delete it. If stuck in deleting post the logs here. $tail /var/log/nova/*.log

Anand TS gravatar imageAnand TS ( 2014-06-18 00:02:31 -0500 )edit

2014-06-20 15:02:55.767 6190 TRACE nova.compute.manager [instance: e20feda5-1f15-4013-8d27-b206b9b4ae7d] instance) 2014-06-20 15:02:55.767 6190 TRACE nova.compute.manager [instance: e20feda5-1f15-4013-8d27-b206b9b4ae7d] File "/usr/lib/python2.6/sit e-packages/nova/network/api.py", line 94, in wrapped 2014-06-20 15:02:55.767 6190 TRACE nova.compute.manager [instance: e20feda5-1f15-4013-8d27-b206b9b4ae7d] return func(self, context, args, *kwargs) 2014-06-20 15:02:55.767 6190 TRACE nova.compute.manager [instance: e20feda5-1f15-4013-8d27-b206b9b4ae7d] File "/usr/lib/python2.6/sit e-packages/nova/network/api.py", line 389, in get_instance_nw_info 2014-06-20 15:02:55.767 6190 TRACE nova.compute.manager [instance: e20feda5-1f15-4013-8d27-b206b9b4ae7d] result = self._get_instanc e_nw_info(context, instance) 2014-06-20 15:02:55.767 6190 TRACE nova.compute.manager [instance: e20feda5-1f15-4013-8d27-b206b9b4ae7d] File "/usr/lib/python2.6/sit e-packages/nova/network/api.py", line 405, in _get_instance_nw_info 2014-06-20 15:02:55.767 6190 TRACE nova.compute.manager [instance: e20feda5-1f15-4013-8d27-b206b9b4ae7d] nw_info = self.network_rpc api.get_instance_nw_info(context, **args) 2014-06-20 ...(more)

danoreilly gravatar imagedanoreilly ( 2014-06-20 16:06:47 -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

2 followers

Stats

Asked: 2014-06-09 14:51:24 -0500

Seen: 3,262 times

Last updated: Jun 17 '14