Ask Your Question

Instance marked as deleted but still present on host?

asked 2013-06-06 05:10:04 -0600

kpostrup gravatar image

updated 2013-06-07 17:35:28 -0600

smaffulli gravatar image

I have deployed Openstack in a testing environment consisting of three hosts. One controller node and two compute nodes (using KVM).

At one point in my testing, I terminated all instances. However, for some reason nova-compute was not responding on the second compute node. The VM which was active on this node is now no longer present in Openstack, e.g. using:

nova-manage vm list
nova list --all-tenants

(no results)

I get the following in nova-compute.log from the second compute node:

 WARNING nova.compute.manager [-] [instance: a4705c75-96e5-42ba-8da6-d998d05fdda6] Detected instance with name label 'instance-0000002b' which is marked as DELETED but still present on host.

How do I force deletion of this instance?

Thank you very much in advance

edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted

answered 2013-06-10 07:52:34 -0600

kpostrup gravatar image


I found the following option for nova.conf


(StrOpt) Action to take if a running deleted instance is detected.Valid options are 'noop', 'log' and 'reap'. Set to 'noop' to disable.

By setting it to "reap" the instances are deleted automatically.

edit flag offensive delete link more



Please accept your answer if it is working!

Jobin gravatar imageJobin ( 2013-06-28 06:17:05 -0600 )edit

answered 2014-08-19 19:55:54 -0600

sengork gravatar image

For reference this method did not work in our case /var/log/nova/compute.log showed:

2014-08-20 10:50:09.606 32739 WARNING nova.compute.manager [-] [instance: 9be70f4c-a697-49ea-b426-673d87aa1bd3] Periodic cleanup failed to delete instance: Info cache for instance 9be70f4c-a697-49ea-b426-673d87aa1bd3 could not be found.

edit flag offensive delete link more

answered 2013-06-08 22:36:05 -0600

RomilGupta gravatar image

Hi , I have also faced such issue long time back. Usually in openstack when you delete an instance the corresponding entry in DB is marked as deleted and nova-compute trigger the destroy instance from Hypervisor, but in your case compute service stops working in between. If you want to destroy those instance from that compute node you can try : virsh destroy <VM>

edit flag offensive delete link more

answered 2015-12-09 10:01:03 -0600

satish.lx gravatar image

cleanup_running_deleted_instances in nova.conf works for me but there is timeout option to i believe default is 300 so around 5 minute.

edit flag offensive delete link more

answered 2013-06-28 04:37:40 -0600

unmesh-gurjar gravatar image

Hi, I think you have found the answer for your question (so this question can be closed now)!

Following is a detailed explanation for better understanding: Nova Compute has a periodic task '_cleanup_running_deleted_instances' which monitors any such instances which are marked deleted in (nova) DB but are running on the hypervisor. But AFAIR the default action of this periodic task is 'log' which only emits a log message.

Solution: For such instances to be cleaned up/destroyed, change the action for this periodic task to 'reap' by setting this value for 'running_deleted_instance_action' config parameter in nova.conf.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2013-06-06 05:10:04 -0600

Seen: 3,690 times

Last updated: Dec 09 '15