[openstack-dev] [ironic] support for various glance image reference formats - do we need them all?

Dmitry Tantsur dtantsur at redhat.com
Tue Aug 8 16:13:31 UTC 2017


Hi!

Thanks for raising this.

On 08/07/2017 02:47 PM, Pavlo Shchelokovskyy wrote:
> Hi all,
> 
> currently our GlanceImageService seems to support several ways of defining a 
> reference to glance image:
> 
> 1) simple image UUID [0]
> 2) image UUID prefixed with 'glance://' protocol [1] (well, actually anything 
> starting with 'glance://' and ending with '/<uuid>')
> 3) full REST path to the image (as in 
> http://<glance-api>/v2/images/<image-uuid>), also used to extract the glance API 
> address [2]
> 
> Support for #3 must surely be removed, as we are moving to API endpoint 
> discovery from keystone catalog.
> Besides I am pretty sure this code path can not actually be reached currently, 
> as the 'is_glance_image' will ignore such image refs and return False for those 
> [3], and 'get_image_service' would also not return the GlanceImageService 
> instance for such image refs [4].
> Hence the question - if it is unusable anyway now, should we execute the 
> standard deprecation process when removing support for it or just remove right away?

If unsure, always use the standard process ;) Unless somebody is ready to set up 
DevStack, and try it out, and prove that it's completely and hopelessly broken.

> 
> As for the #1 and #2 I do not see any big difference between those, and proposed 
> deprecating and eventually removing support for #2 ('glance://' scheme) as part 
> of [5]. Two people in review already raised a concern about removing such support.

To be honest, I like glance://<uuid> more, as it makes it obvious where the 
image is coming from vs http://. I don't mind removing it too much, but I guess 
supporting it is not a lot of code, right?

> 
> Thus I'd like to ask a broader audience - do we need support for glance image 
> references in 'glance://*<UUID>' form? Is it actually used somewhere? What are 
> the benefits of having it besides simple UUID?
> 
> [0] 
> http://git.openstack.org/cgit/openstack/ironic/tree/ironic/common/glance_service/service_utils.py#n149
> [1] 
> http://git.openstack.org/cgit/openstack/ironic/tree/ironic/common/glance_service/service_utils.py#n155
> [2] 
> http://git.openstack.org/cgit/openstack/ironic/tree/ironic/common/glance_service/service_utils.py#n160
> [3] 
> http://git.openstack.org/cgit/openstack/ironic/tree/ironic/common/glance_service/service_utils.py#n208
> [4] 
> http://git.openstack.org/cgit/openstack/ironic/tree/ironic/common/image_service.py#n267
> [5] https://review.openstack.org/#/c/467728
> 
> Cheers,
> 
> -- 
> Dr. Pavlo Shchelokovskyy
> Senior Software Engineer
> Mirantis Inc
> www.mirantis.com <http://www.mirantis.com>
> 
> 
> __________________________________________________________________________
> 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
> 




More information about the OpenStack-dev mailing list