[openstack-dev] [glance] Does glance_store swift driver support range requests ?
Nikhil Komawar
nik.komawar at gmail.com
Mon Nov 13 22:51:51 UTC 2017
I think it will a rather hard problem to solve. As swift store can be
configured to store objects in different configurations. I guess the next
question would be, what is your underlying problem -- multiple build
requests or is this for retry for a single download?
If the image is in image cache and you are hitting the glance node with
cached image (which is quite possible for tiny deployments), this feature
will be relatively easier.
On Mon, Nov 13, 2017 at 6:47 AM, Matt Keenan <matt.keenan at oracle.com> wrote:
> Hi,
>
> Just configured devstack on Fedora 26, and by default glance_store uses
> swift for image storage. When attempting to get a specific range from a
> glance stored image, it's reporting range requests are not supported e.g.:
>
> $ curl -i -X GET -r 0-32 -H "X-Auth-Token: $auth_token"
> http://10.169.104.255/image/v2/images/29b7aa
> 5e-3ec2-49b5-ab6b-d6cc5099f46c/file
> HTTP/1.1 400 Bad Request
> Date: Mon, 13 Nov 2017 10:43:23 GMT
> Server: Apache/2.4.27 (Fedora) OpenSSL/1.1.0f-fips mod_wsgi/4.5.15
> Python/2.7
> Content-Length: 205
> Content-Type: text/html; charset=UTF-8
> x-openstack-request-id: req-5ed2239f-165b-406f-969b-5cc4ab8c632d
> Connection: close
>
> <html>
> <head>
> <title>400 Bad Request</title>
> </head>
> <body>
> <h1>400 Bad Request</h1>
> Getting images randomly from this store is not supported. Offset: 0,
> length: 33<br /><br />
> </body>
>
> Upon investigation, glance-api log is emitting:
>
> Nov 13 10:45:31 devstack at g-api.service[22783]: #033[01;31mERROR
> glance.location [#033[01;36mNone req-ad6da3f0-ead1-486a-a873-d301f02b0888
> #033[00;36mdemo demo#033[01;31m] #033[01;35m#033[0│·····················1;31mGlance
> tried all active locations to get data for image
> 29b7aa5e-3ec2-49b5-ab6b-d6cc5099f46c but all have failed.#033[00m:
> StoreRandomGetNotSupported: Getting images randomly from this store is
> notMDg4OCAjMDMzWzAwOzM2bW supported. Offset: 0, length: 33
>
> The exception StoreRandomGetNotSupported is emitted by glance_store from
> glance_store/capabilities.py:
>
> op_exec_map = {
> 'get': (exceptions.StoreRandomGetNotSupported
> if kwargs.get('offset') or kwargs.get('chunk_size') else
> exceptions.StoreGetNotSupported),
> 'add': exceptions.StoreAddDisabled,
> 'delete': exceptions.StoreDeleteNotSupported}
>
> Looking at _driver/swift/store.py I think range requests are supported, it
> I've be unsuccessful in configuring it.
>
> Does the glance_store swift driver support range requests ?
>
> Can it be configured within a conf file, by somehow adding a capability ?
>
> thanks
>
> Matt
>
> --
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
--
--
Thanks,
Nikhil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20171113/978db8df/attachment.html>
More information about the OpenStack-dev
mailing list