Ask Your Question
0

Unable to delete vm in 12.04 with libvirt_images_type=lvm

asked 2012-10-13 08:39:56 -0500

Hello,

I am running Ubuntu 12.04 and I installed OpenStack Folsom through Ubuntu Cloud Archive. The package version for nova-compute when I was testing this was 2012.2-0ubuntu3~cloud0.

I configured nova-compute to use LVM as instance storage backend and I put these two lines in nova.conf.

libvirt_images_type=lvm libvirt_images_volume_group=nova-volumes

These two options are described in the blueprint here: https://blueprints.launchpad.net/nova/+spec/lvm-disk-images (https://blueprints.launchpad.net/nova...)

Deleting the VM using the dashboard failed. And I have this error in the nova-compute log:

2012-10-11 13:36:22 ERROR nova.openstack.common.rpc.amqp [-] Exception during message handling 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp Traceback (most recent call last): 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/amqp.py", line 275, in _process_data 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp rval = self.proxy.dispatch(ctxt, version, method, *args) 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/dispatcher.py", line 145, in dispatch 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp return getattr(proxyobj, method)(ctxt, *kwargs) 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 117, in wrapped 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp temp_level, payload) 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__ 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp self.gen.next() 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 92, in wrapped 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp return f(args, *kw) 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 202, in decorated_function 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp kwargs['instance']['uuid'], e, sys.exc_info()) 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__ 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp self.gen.next() 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 196, in decorated_function 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp return function(self, context, args, *kwargs) 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 934, in terminate_instance 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp do_terminate_instance(instance) 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/utils.py", line 752, in inner 2012-10-11 13:36:22 TRACE nova.openstack.common.rpc.amqp retval = f(args, *kwargs) 2012-10-11 13 ... (more)

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2012-10-20 20:52:05 -0500

The above bug prevents instances being deleted. Their logical volume needs to be manually removed before nova delete works.

(out of interest - on 12.10, the lvs command with lv_path completes successfully, but the Logical Volume isn't deleted when the instance is deleted)

edit flag offensive delete link more
0

answered 2012-10-21 01:01:23 -0500

I patched list_logical_volumes in /usr/lib/python2.7/dist-packages/nova/virt/libvirt/utils.py:

  • out, err = execute('lvs', '--noheadings', '-o', 'lv_path', vg,
  • out, err = execute('lvs', '--noheadings', '-o', 'lv_name', vg,

and restart nova-compute. The logical volume can be deleted successfully afterwards.

edit flag offensive delete link more
0

answered 2012-11-12 21:03:09 -0500

this is also the case on -- CentOS release 6.2 (Final)

Once I applied the patch above all worked properly

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: 2012-10-13 08:39:56 -0500

Seen: 44 times

Last updated: Nov 12 '12