summaryrefslogtreecommitdiffstats
path: root/nova/openstack
diff options
context:
space:
mode:
authorChuck Short <chuck.short@canonical.com>2012-08-06 19:25:12 -0500
committerChuck Short <chuck.short@canonical.com>2012-08-06 19:53:08 -0500
commitfe264ba158e8dc7f8b249bc6619d7001e7819c5d (patch)
tree76d1370136c2225ac33dcab3df9020e76ffd3d35 /nova/openstack
parent7015ad6fa93546a69600a354fa2080d9c0965b7d (diff)
downloadnova-fe264ba158e8dc7f8b249bc6619d7001e7819c5d.tar.gz
nova-fe264ba158e8dc7f8b249bc6619d7001e7819c5d.tar.xz
nova-fe264ba158e8dc7f8b249bc6619d7001e7819c5d.zip
Fix traceback when detaching volumes via EC2
When detaching a volume from an instance it results in the following traceback: Cinderclient connection created using URL: http://192.168.1.103:8776/v1/bc02ec05c5fa4a5bb3020b617f3574e2 2012-08-06 18:58:32 ERROR nova.api.ec2 [req-1fd2f017-8a11-481f-b901-ae61d3f55c94 demo demo] Unexpected error raised: 'instance_uuid' 2012-08-06 18:58:32 TRACE nova.api.ec2 Traceback (most recent call last): 2012-08-06 18:58:32 TRACE nova.api.ec2 File "/opt/stack/nova/nova/api/ec2/__init__.py", line 474, in __call__ 2012-08-06 18:58:32 TRACE nova.api.ec2 result = api_request.invoke(context) 2012-08-06 18:58:32 TRACE nova.api.ec2 File "/opt/stack/nova/nova/api/ec2/apirequest.py", line 81, in invoke 2012-08-06 18:58:32 TRACE nova.api.ec2 result = method(context, **args) 2012-08-06 18:58:32 TRACE nova.api.ec2 File "/opt/stack/nova/nova/api/ec2/cloud.py", line 799, in detach_volume 2012-08-06 18:58:32 TRACE nova.api.ec2 self.compute_api.detach_volume(context,volume_id=volume_id) 2012-08-06 18:58:32 TRACE nova.api.ec2 File "/opt/stack/nova/nova/compute/api.py", line 1642, in detach_volume 2012-08-06 18:58:32 TRACE nova.api.ec2 instance_uuid = volume['instance_uuid'] 2012-08-06 18:58:32 TRACE nova.api.ec2 KeyError: 'instance_uuid' By the time the volume in the cinder database the instance_uuid is already 'NULL', so get the instance_uuid from the volume before its detached. Fixes LP: #1033713 Change-Id: Id5515881b08af9d0832b4b620c03e471fdff0823 Signed-off-by: Chuck Short <chuck.short@canonical.com>
Diffstat (limited to 'nova/openstack')
0 files changed, 0 insertions, 0 deletions