A GET on imagedata in glance v2 returns 404 instead of 204 when data does not exist.

Bug #1251055 reported by Alex Meade
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
David Koo

Bug Description

A GET on imagedata in glance v2 returns 404 instead of 204 when data does not exist.

See http://docs.openstack.org/api/openstack-image-service/2.0/content/get-image-file.html

curl -i -X GET -H "Content-Type: application/json" -H "X-Auth-Token: $AUTH_TOKEN" http://localhost:9292/v2/images/e3a8964d-b320-450d-a729-1735dac05ba9/file

HTTP/1.1 404 Not Found
Content-Length: 150
Content-Type: text/html; charset=UTF-8
X-Openstack-Request-Id: req-fcc598de-6012-4576-a74b-833bfd6e1299
Date: Wed, 13 Nov 2013 20:51:31 GMT

<html>
 <head>
  <title>404 Not Found</title>
 </head>
 <body>
  <h1>404 Not Found</h1>
  No image data could be found<br /><br />
 </body>
</html>

Changed in glance:
assignee: nobody → anusha rayani (anusha-rayani-7)
Revision history for this message
Shree Duth Awasthi (shreeduth-awasthi) wrote :

Hi Alex,

The bug seems to be similar to https://bugs.launchpad.net/glance/+bug/1251058

Can you please eloborate, if it is not the same case.

Thanks.

Revision history for this message
David Koo (kpublicmail) wrote :

Hi Anusha,

Are you still working on this? I have a fix ready so if you're not working on this I can take it over.

Thanks.

David Koo (kpublicmail)
Changed in glance:
assignee: anusha rayani (anusha-rayani-7) → David Koo (kpublicmail)
David Koo (kpublicmail)
Changed in glance:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

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

Reviewed: https://review.openstack.org/61649
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=55937308c2020cbc185f656779f5876eae6ca29c
Submitter: Jenkins
Branch: master

commit 55937308c2020cbc185f656779f5876eae6ca29c
Author: David Koo <email address hidden>
Date: Thu Dec 12 12:00:11 2013 +0800

    Return 204 when image data does not exist

    Currently a GET on image-data in glance v2 returns 404 when data does not
    exist. But according to the API docs the HTTP status code returned in this
    case should be 204.

    This fix makes Glance return the right HTTP status code.

    Change-Id: I34cf68e96f631f05cff349329245f74aee42397c
    Closes-Bug: #1251055

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: icehouse-2 → 2014.1
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.