Ask Your Question

Can't delete or force-delete instance

asked 2014-04-09 22:04:10 -0600

This is Havana on Centos 6.5 on a VM-based test installation for learning. I am using the Redhat/Centos installation guide. One control node, two compute nodes.

My goal is to remove a few instances. Some are on a compute host that is currently down, one is on a compute host that is up but appears to be misconfigured.

First, I try nova delete. This turns some instances' Task States to "deleting", but doesn't delete anything. I am doing this as the admin user.

nova list:

| Name      | Status  | Task State | Power State | Networks       |
| cirros-12 | SHUTOFF | deleting   | Shutdown    | vmnet= |
| cirros-15 | ERROR   | -          | NOSTATE     |                |

nova force-delete cirros-12:

ERROR: Cannot 'forceDelete' while instance is in vm_state stopped (HTTP 409) [...]

nova force-delete cirros-15:

ERROR: Cannot 'forceDelete' while instance is in vm_state error (HTTP 409) [...]

cirros-15 is on the misconfigured compute host; thus the error state.

It seems that I could use SQL to remove it from the database, but am not sure if this is the right way to do it, and it's tedious and error-prone anyway. So, what do I do in such a situation?

edit retag flag offensive close merge delete

2 answers

Sort by ┬╗ oldest newest most voted

answered 2014-04-10 03:15:53 -0600

foexle gravatar image

Hi Bernd,

you can try to set a new state via nova cli of each instance and after that try to delete again.

If that not working you can try to "evacuate" your instances to an other comp node. If all trys fails, yes you need to change your db table thats the last way.

The unused base image on your comp nodes will be cleaned after a while it depends on your settings.

Cheers Heiko

edit flag offensive delete link more


To prevent some correctly running instances, you need only to change the correct rows in the db table instead of purge and recreate the whole db :)

foexle gravatar imagefoexle ( 2014-04-10 08:22:01 -0600 )edit

answered 2014-04-10 07:14:19 -0600

Dankesch├Ân Heiko. I "solved" the problem by reinitializing the nova DB: openstack-db --drop followed by openstack-db --init. So all is fine now, except that I can't try your suggestions :) This strange state of my cloud was probably caused by bad configuration, e.g. wrong ownership of /etc/nova.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-04-09 22:04:10 -0600

Seen: 23,149 times

Last updated: Apr 10 '14