unable to delete VMs using nova delete command

Asked by Upendra

Hi,
I have a setup where there are two compute nodes, say (C1 and C2).
C1 is also the cloud-controller node and object-store node.
I have a few VMs which show up using nova list command (as shown below):
===================================
$ nova list
+----+-----------+---------+-----------+--------------+
| ID | Name | Status | Public IP | Private IP |
+----+-----------+---------+-----------+--------------+
| 87 | Server 87 | SHUTOFF | | 9.59.231.196 |
| 88 | Server 88 | SHUTOFF | | |
| 89 | Server 89 | SHUTOFF | | |
+----+-----------+---------+-----------+--------------+
====================================

I want to delete all the three VMs; so use "nova delete" command and nothing really happens. I am pasting my nova-api.log. Nothing shows up in nova-compute.log.
I am fine with manually removing the entries from mysql-table if there is a way (without breaking the installation) ...
Any help will be appreciated.

thanks,
-upendra

======== C1:/var/log/nova/nova-api.log =========
2011-08-18 11:02:01,612 DEBUG nova.api.openstack [-] Successfully authenticated 'upendra' from (pid=1783) authenticate /usr/lib/pymodules/python2.6/nova/api/openstack/auth.py:111
2011-08-18 11:02:01,631 DEBUG routes.middleware [-] Matched GET /servers/87 from (pid=1783) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:100
2011-08-18 11:02:01,631 DEBUG routes.middleware [-] Route path: '/servers/:(id)', defaults: {'action': u'show', 'controller': <nova.api.openstack.wsgi.Resource object at 0x20b7510>} from (pid=1783) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:102
2011-08-18 11:02:01,632 DEBUG routes.middleware [-] Match dict: {'action': u'show', 'controller': <nova.api.openstack.wsgi.Resource object at 0x20b7510>, 'id': u'87'} from (pid=1783) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:103
2011-08-18 11:02:01,632 INFO nova.api.openstack.wsgi [-] GET http://19.69.230.129:8774/v1.0/servers/87?fresh=1313679721.61
2011-08-18 11:02:01,799 INFO nova.api.openstack.wsgi [-] http://19.69.230.129:8774/v1.0/servers/87?fresh=1313679721.61 returned with HTTP 200
2011-08-18 11:02:01,817 DEBUG routes.middleware [-] Matched DELETE /servers/87 from (pid=1783) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:100
2011-08-18 11:02:01,818 DEBUG routes.middleware [-] Route path: '/servers/:(id)', defaults: {'action': u'delete', 'controller': <nova.api.openstack.wsgi.Resource object at 0x20b7510>} from (pid=1783) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:102
2011-08-18 11:02:01,818 DEBUG routes.middleware [-] Match dict: {'action': u'delete', 'controller': <nova.api.openstack.wsgi.Resource object at 0x20b7510>, 'id': u'87'} from (pid=1783) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:103
2011-08-18 11:02:01,818 INFO nova.api.openstack.wsgi [-] DELETE http://19.69.230.129:8774/v1.0/servers/87
2011-08-18 11:02:01,818 DEBUG nova.compute.api [-] Going to try to terminate 87 from (pid=1783) delete /usr/lib/pymodules/python2.6/nova/compute/api.py:544
2011-08-18 11:02:01,980 DEBUG nova.rpc [-] Making asynchronous cast on compute.ibc6hb05... from (pid=1783) cast /usr/lib/pymodules/python2.6/nova/rpc.py:554
2011-08-18 11:02:02,021 INFO nova.api.openstack.wsgi [-] http://19.69.230.129:8774/v1.0/servers/87 returned with HTTP 202
====================================

======= C2:/var/log/nova/nova-compute.log ==========
2011-08-18 11:04:11,926 INFO nova.compute.manager [-] Updating host status
2011-08-18 11:04:11,958 INFO nova.compute.manager [-] Found instance 'instance-00000057' in DB but no VM. State=5, so setting state to shutoff.
2011-08-18 11:04:11,959 INFO nova.compute.manager [-] Found instance 'instance-00000058' in DB but no VM. State=5, so setting state to shutoff.
2011-08-18 11:04:11,959 INFO nova.compute.manager [-] Found instance 'instance-00000059' in DB but no VM. State=5, so setting state to shutoff.
================================================

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Upendra
Solved:
Last query:
Last reply:
Revision history for this message
Brian Lamar (blamar) said :
#1

Is compute.ibc6hb05 the correct name of the compute host which owns the VM? What does the output of "nova-manage service list" show? Can you show farther back in the nova-compute.log? It seems that the snippet you're showing is from a couple minutes after the delete was called.

Revision history for this message
Upendra (upendras) said :
#2

Thanks Brian for a prompt response.

I re-started all the services on ibc6hb05 (which I was calling C2) ... everything stated to behave normally and I could also delete it those instances ...

$ sudo libvirtd restart; sudo service nova-network restart;sudo service nova-compute restart;sudo service nova-api restart; sudo service nova-scheduler restart;

I do not know why it was not working earlier ... but, looks like, restarting was a quick-fix.

thanks again,
-upendra