Traceback when detaching volumes when using cinder.

Bug #1033713 reported by Chuck Short
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Chuck Short

Bug Description

2012-08-06 18:58:32 DEBUG nova.api.ec2 [req-1fd2f017-8a11-481f-b901-ae61d3f55c94 demo demo] action: DetachVolume from (pid=15071) __call__ /opt/stack/nova/nova/api/ec2/__init__.py:327
action: DetachVolume
2012-08-06 18:58:32 DEBUG nova.api.ec2 [req-1fd2f017-8a11-481f-b901-ae61d3f55c94 demo demo] arg: VolumeId val: vol-1 from (pid=15071) __call__ /opt/stack/nova/nova/api/ec2/__init__.py:329
arg: VolumeId val: vol-1
2012-08-06 18:58:32 DEBUG nova.utils [req-1fd2f017-8a11-481f-b901-ae61d3f55c94 demo demo] backend <module 'nova.db.sqlalchemy.api' from '/opt/stack/nova/nova/db/sqlalchemy/api.pyc'> from (pid=15071) __get_backend /opt/stack/nova/nova/utils.py:496
backend <module 'nova.db.sqlalchemy.api' from '/opt/stack/nova/nova/db/sqlalchemy/api.pyc'>
2012-08-06 18:58:32 AUDIT nova.api.ec2.cloud [req-1fd2f017-8a11-481f-b901-ae61d3f55c94 demo demo] Detach volume adba91f0-a36f-40e6-bbc7-796448d8fc9a
Detach volume adba91f0-a36f-40e6-bbc7-796448d8fc9a
2012-08-06 18:58:32 DEBUG nova.volume.cinder [req-1fd2f017-8a11-481f-b901-ae61d3f55c94 demo demo] Cinderclient connection created using URL: http://192.168.1.103:8776/v1/bc02ec05c5fa4a5bb3020b617f3574e2 from (pid=15071) cinderclient /opt/stack/nova/nova
/volume/cinder.py:47
Cinderclient connection created using URL: http://192.168.1.103:8776/v1/bc02ec05c5fa4a5bb3020b617f3574e2
2012-08-06 18:58:32 INFO nova.api.ec2.cloud [req-1fd2f017-8a11-481f-b901-ae61d3f55c94 demo demo] !!!! {'status': u'available', 'volume_type_id': u'None', 'display_name': None, 'attach_time': '', 'availability_zone': u'cinder', 'created_at': u'2012-08-06
T23:53:21.000000', 'attach_status': 'detached', 'display_description': None, 'volume_metadata': [], 'snapshot_id': None, 'mountpoint': '', 'id': u'adba91f0-a36f-40e6-bbc7-796448d8fc9a', 'size': 1}
!!!! {'status': u'available', 'volume_type_id': u'None', 'display_name': None, 'attach_time': '', 'availability_zone': u'cinder', 'created_at': u'2012-08-06T23:53:21.000000', 'attach_status': 'detached', 'display_description': None, 'volume_metadata': [
], 'snapshot_id': None, 'mountpoint': '', 'id': u'adba91f0-a36f-40e6-bbc7-796448d8fc9a', 'size': 1}
2012-08-06 18:58:32 DEBUG nova.volume.cinder [req-1fd2f017-8a11-481f-b901-ae61d3f55c94 demo demo] Cinderclient connection created using URL: http://192.168.1.103:8776/v1/bc02ec05c5fa4a5bb3020b617f3574e2 from (pid=15071) cinderclient /opt/stack/nova/nova
/volume/cinder.py:47
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'
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'
2012-08-06 18:58:32 TRACE nova.api.ec2
2012-08-06 18:58:32 ERROR nova.api.ec2 [req-1fd2f017-8a11-481f-b901-ae61d3f55c94 demo demo] Environment: {"CONTENT_TYPE": "application/x-www-form-urlencoded; charset=UTF-8", "SCRIPT_NAME": "/services/Cloud", "REQUEST_METHOD": "POST", "HTTP_HOST": "192.168.1.103:8773", "PATH_INFO": "/", "SERVER_PROTOCOL": "HTTP/1.0", "HTTP_USER_AGENT": "Boto/2.1.1 (linux2)", "SERVER_NAME": "192.168.1.103", "REMOTE_ADDR": "192.168.1.103", "wsgi.url_scheme": "http", "SERVER_PORT": "8773", "GATEWAY_INTERFACE": "CGI/1.1", "HTTP_ACCEPT_ENCODING": "identity"}

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/10932

Changed in nova:
assignee: nobody → Chuck Short (zulcss)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/10932
Committed: http://github.com/openstack/nova/commit/fe264ba158e8dc7f8b249bc6619d7001e7819c5d
Submitter: Jenkins
Branch: master

commit fe264ba158e8dc7f8b249bc6619d7001e7819c5d
Author: Chuck Short <email address hidden>
Date: Mon Aug 6 19:25:12 2012 -0500

    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 <email address hidden>

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → folsom-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-3 → 2012.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.