← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1515457] Re: Delete an instance created from volume would be unsuccessful if the connection_info has no volume_id

 

[Expired for OpenStack Compute (nova) because there has been no activity
for 60 days.]

** Changed in: nova
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1515457

Title:
  Delete an instance created from volume would be unsuccessful if the
  connection_info has no volume_id

Status in OpenStack Compute (nova):
  Expired

Bug description:
  description:
  when delete an instance created from the volume. It will get the volume metadata like this :
      volume_id = connection_info['data']['volume_id']
  But the connection_info has no volume_id. It will be error.

  version :2014.1.

  Relevant log :
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2587, in do_terminate_instance
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]     self._delete_instance(context, instance, bdms, quotas)
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]   File "/usr/lib/python2.7/site-packages/nova/hooks.py", line 103, in inner
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]     rv = f(*args, **kwargs)
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2556, in _delete_instance
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]     quotas.rollback()
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]   File "/usr/lib/python2.7/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]     six.reraise(self.type_, self.value, self.tb)
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2528, in _delete_instance
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]     self._shutdown_instance(context, db_inst, bdms)
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2463, in _shutdown_instance
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]     requested_networks)
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]   File "/usr/lib/python2.7/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]     six.reraise(self.type_, self.value, self.tb)
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2453, in _shutdown_instance
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]     block_device_info)
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 1009, in destroy
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]     destroy_disks)
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 1098, in cleanup
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]     volume_meta = self._get_volume_metadata(context, connection_info)
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 3642, in _get_volume_metadata
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add]     raise exception.InvalidBDMVolume(id=volume_id)
  2015-11-12 17:03:52.676 6137 TRACE nova.compute.manager [instance: 4d6213cb-4761-49fb-a993-37833f5a6add] UnboundLocalError: local variable 'volume_id' referenced before assignment

  Reproduce steps:
  1 create a volume named a from an image
  2 create an instance from the volume a
  3 delete the instance

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1515457/+subscriptions


References