[openstack-dev] [tc] [all] [glance] Answers to some questions about Glance

Brian Rosmaita brian.rosmaita at RACKSPACE.COM
Tue May 17 12:54:34 UTC 2016

Subject was: Re: [openstack-dev] [tc] [all] [glance] On operating a high throughput or otherwise team

Un-hijacking the thread.  Here are some answers to John's questions, hope they are helpful.

On 5/16/16, 9:06 PM, "John Griffith" <john.griffith8 at gmail.com<mailto:john.griffith8 at gmail.com>> wrote:

Maybe not related, but maybe it is.  After spending the past couple of hours trying to help a customer with a Glance issue I'm a bit... well annoyed with Glance.  I'd like to chime in on this thread.  I'm honesty not entirely sure what the goal of the thread is, but honestly there's something rather important to me that I don't really seem to see being called out.

Is there any way we could stop breaking the API and it's behaviors?  Is there any way we can fix some of the issues with respect to how things work when folks configure multiple Glance repos?

Couple of examples:
1. switching from "is_public=true" to "visibility=public"

This was a major version change in the Images API.  The 'is_public' boolean is in the original Images v1 API, 'visibility' was introduced with the Images v2 API in the Folsom release.  You just need an awareness of which version of the API you're talking to.

Ok, cool, I'm sure there's great reasons, but it really sucks when folks update their client and now none of their automation works any longer

The Images v1 API went from CURRENT to SUPPORTED in the Kilo release (April 30, 2015).  The python-glanceclient began using v2 as the default with Change-Id: I09c9e409d149e2d797785591183e06c13229b7f7 on June 21, 2015 (and hence would have been in release 0.17.2 on July 16, 2015).  So these changes have been in the works for a while.

2. making virtual_size R/O

So for some time this was a property that folks could use to set the size of an image needed for things like volume creation, cloning etc.  At some point though it was decided "this should be read only", ok... well again all sorts of code is now broken, including code in Cinder.​  It also seems there's no way to set it, so it's always there and just Null.  It looked like I would be able to set it during image-create maybe... but then I hit number 3.

The virtual_size was added to the Images v2 API with Change-Id: Ie4f58ee2e4da3a6c1229840295c7f62023a95b70 on February 11, 2014.  The commit message indicates: "This patch adds the knowledge of a virtual_size field to Glance's API v2. The virtual_size field should respect the same rules applied to the size field in terms of readability, access control and propagation."  The 'size' field has never been end-user modifiable, hence the virtual_size is read-only as well.

3. broken parsing for size and virtual_size

I just started looking at this one and I'm not sure what happened here yet, but it seems that these inputs aren't being parsed any more and are now raising an exception due to trying to stuff a string into an int field in the json schema.

Please file a bug with some details when you know more about this one.  It sounds like a client issue, but you can put details in the bug report.

So I think if the project wants to move faster that's great, but please is theres any chance to value backwards compatibility just a bit more?​  I'm sure I'm going to get flamed for this email, and the likely response will be "you're doing it wrong".  I guess if I'm the only one that has these sorts of issues then alright, I deserve the flames, and maybe somebody will enlighten me on the proper ways of using Glance so I can be happier and more in tune with my Universe.

Well, since you asked for enlightenment ... it *is* helpful to make sure that you know which version of the Images API you're using.  The Glance community values backwards compatibility, but not across major releases.

As I imagine you're aware, Glance is tagged "release: cycle-with-milestones", so you can read about any changes in the release notes.  Or if you want a quick overview of what major features were added to Glance for each release, there was an excellent presentation at the Tokyo summit about the evolution of the Glance APIs:
slides only: http://www.slideshare.net/racker_br/the-evolution-of-glance-api-on-the-way-from-v1-to-v3

Before people begin freaking out at the mention of the Images v3 API, please note that the presentation above described the state of Glance as of October 2015.  The Glance documentation has a statement about the two Images APIs and the current plans for The Future that was updated shortly after the Austin summit:
(Spoiler alert: no plans for Images v3 API at this point.)


Hope that was helpful,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160517/e53eb18d/attachment.html>

More information about the OpenStack-dev mailing list