Ask Your Question
1

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=10.0.0.2 |
| 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
1

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

Comments

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
-1

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

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-04-09 22:04:10 -0600

Seen: 19,239 times

Last updated: Apr 10 '14