← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1417069] [NEW] Glance does not support HTTP Range requests

 

Public bug reported:

Glance API currently does not support Range requests regardless of
whether the underlying glance_store driver supports it or not.

For instance if using the Glance V2 API you should be able to use
following curl command to request the first 32 bytes a of the glance
stored image:

 # curl -i -X GET -r 0-32 -H "X-Auth-Token: $token"
$image_url/v2/images/{image_id}/file

This places the HTTP header "Range: bytes=0-32" into the request. Glance
currently ignores this and always returns then entire image. Glance does
have some build in knowledge of Content-Range requests, which is
different.

Glance should also return 206 Partial Content when returning a range,
See bug https://bugs.launchpad.net/glance/+bug/1399851.

Attached is a patch to glance which provides Range specific support and
also returns 206 as per fix from above bug.

** Affects: glance
     Importance: Undecided
         Status: New

** Patch added: "Proposed patch"
   https://bugs.launchpad.net/bugs/1417069/+attachment/4310404/+files/range-support.diff

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1417069

Title:
  Glance does not support HTTP Range requests

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  Glance API currently does not support Range requests regardless of
  whether the underlying glance_store driver supports it or not.

  For instance if using the Glance V2 API you should be able to use
  following curl command to request the first 32 bytes a of the glance
  stored image:

   # curl -i -X GET -r 0-32 -H "X-Auth-Token: $token"
  $image_url/v2/images/{image_id}/file

  This places the HTTP header "Range: bytes=0-32" into the request.
  Glance currently ignores this and always returns then entire image.
  Glance does have some build in knowledge of Content-Range requests,
  which is different.

  Glance should also return 206 Partial Content when returning a range,
  See bug https://bugs.launchpad.net/glance/+bug/1399851.

  Attached is a patch to glance which provides Range specific support
  and also returns 206 as per fix from above bug.

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


Follow ups

References