[openstack-dev] Glance Store Future
Flavio Percoco
flavio at redhat.com
Mon Aug 4 10:15:22 UTC 2014
On 08/01/2014 10:41 PM, Jay Pipes wrote:
> cc'ing ML since it's an important discussion, IMO...
>
> On 07/31/2014 11:54 AM, Arnaud Legendre wrote:
>> Hi Jay,
>>
>> I would be interested if you could share your point of view on this
>> item: we want to make the glance stores a standalone library
>> (glance.stores) which would be consumed directly by Nova and Cinder.
>
> Yes, I have been enthusiastic about this effort for a long time now :)
> In fact, I have been pushing a series of patches (most merged at this
> point) in Nova to clean up the (very) messy nova.image.glance module and
> standardize the image API in Nova.
>
> The messiest part of the current image API in Nova, by far, is the
> nova.image.glance.GlanceImageService.download() method, which you
> highlight below. The reason it is so messy is that the method does
> different things (and returns different things!) depending on how you
> call it and what arguments you provide. :(
+1
>
>> I think it would be nice to get your pov since you worked a lot on
>> the Nova image interface recently. To give you an example:
>>
>> Here
>> https://github.com/openstack/nova/blob/master/nova/image/glance.py#L333,
>> we would do:
>>
>> 1. location = get_image_location(image_id),
>> 2. get(location) from the
>> glance.stores library like for example rbd
>> (https://github.com/openstack/glance/blob/master/glance/store/rbd.py#L206)
>>
>
> Yup. Though I'd love for this code to live in olso, not glance...
I think both places make sense. The reason why we decided to keep it
under glance is because it's still an important piece of the project and
the team is willing to maintain it, plus the team is already familiar
with the code.
Not sure how strong those points are but AFAIR, those two are the reason
why the lib lives under glance. Here's the link to the email thread were
this was discussed:
http://lists.openstack.org/pipermail/openstack-dev/2013-December/022907.html
>
> Plus, I'd almost prefer to see an interface that hides the location URIs
> entirely and makes the discovery of those location URIs entirely
> encapsulated within glance.store. So, for instance, instead of getting
> the image location using a call to glanceclient.show(), parsing the
> locations collection from the v2 API response, and passing that URI to
> the glance.store.get() function, I'd prefer to see an interface more
> like this:
FWIW, The API is not finished (probably not even started :D). The first
step we wanted to pursue was pulling the code out of Glance and just
then work on an improved, more secure and more consistent API. Your
proposal looks neat, I'll propose a design session for the glance.store
API. :D
Thanks for your feedback,
Flavio
--
@flaper87
Flavio Percoco
More information about the OpenStack-dev
mailing list