nova can't show or delete queued image for AttributeError

Bug #1321186 reported by Liusheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Liusheng
Icehouse
Fix Released
Undecided
Vish Ishaya

Bug Description

steps to reproduce:
1. run "glance image-create" to create a queued image
2. run "nova image-delete <image-id>"

it returns:
Delete for image b31aa5dd-f07a-4748-8f15-398346887584 failed: The server has either erred or is incapable of performing the requested operation. (HTTP 500)

the traceback in log file is:

Traceback (most recent call last):
  File "/opt/stack/nova/nova/api/openstack/__init__.py", line 125, in __call__
    return req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/opt/stack/python-keystoneclient/keystoneclient/middleware/auth_token.py", line 632, in __call__
    return self.app(env, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 917, in __call__
    content_type, body, accept)
  File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 983, in _process_stack
    action_result = self.dispatch(meth, request, action_args)
  File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 1067, in dispatch
    return method(req=request, **action_args)
  File "/opt/stack/nova/nova/api/openstack/compute/images.py", line 139, in show
    image = self._image_service.show(context, id)
  File "/opt/stack/nova/nova/image/glance.py", line 277, in show
    base_image_meta = _translate_from_glance(image)
  File "/opt/stack/nova/nova/image/glance.py", line 462, in _translate_from_glance
    image_meta = _extract_attributes(image)
  File "/opt/stack/nova/nova/image/glance.py", line 530, in _extract_attributes
    output[attr] = getattr(image, attr)
  File "/opt/stack/python-glanceclient/glanceclient/openstack/common/apiclient/base.py", line 462, in __getattr__
    return self.__getattr__(k)
  File "/opt/stack/python-glanceclient/glanceclient/openstack/common/apiclient/base.py", line 464, in __getattr__
    raise AttributeError(k)
AttributeError: disk_format

Liusheng (liusheng)
Changed in nova:
assignee: nobody → Liusheng (liusheng)
Liusheng (liusheng)
summary: - nova can't delete queued image for AttributeError
+ nova can't show or delete queued image for AttributeError
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/94338

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

Reviewed: https://review.openstack.org/94338
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=4c5dea6a5103a141b0ca13dcd57b32b3261180d1
Submitter: Jenkins
Branch: master

commit 4c5dea6a5103a141b0ca13dcd57b32b3261180d1
Author: liu-sheng <email address hidden>
Date: Tue May 20 18:33:25 2014 +0800

    Fix nova image-show with queued image

    Currently, the nova image-show command cannot be used with queued images,
    because they don't have certain attributes set yet. Nova will raise
    AttributeError, which causes a 500 to be returned from the API.

    Change-Id: I7d73b891545492e3e247eebdf02507cb630eb250
    Closes-bug: #1321186

Changed in nova:
status: In Progress → Fix Committed
tags: added: icehouse-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/95960

Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/icehouse)

Reviewed: https://review.openstack.org/95960
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=cce6d22c6430048d6789dec04b43c1483f4a0b8d
Submitter: Jenkins
Branch: stable/icehouse

commit cce6d22c6430048d6789dec04b43c1483f4a0b8d
Author: liu-sheng <email address hidden>
Date: Tue May 20 18:33:25 2014 +0800

    Fix nova image-show with queued image

    Currently, the nova image-show command cannot be used with queued images,
    because they don't have certain attributes set yet. Nova will raise
    AttributeError, which causes a 500 to be returned from the API.

    Change-Id: I7d73b891545492e3e247eebdf02507cb630eb250
    Closes-bug: #1321186
    (cherry picked from commit 4c5dea6a5103a141b0ca13dcd57b32b3261180d1)

tags: added: in-stable-icehouse
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-1 → 2014.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.