[openstack-dev] Nova support for Glance v2 API

Michael J Fork mjfork at us.ibm.com
Sat Feb 16 04:08:12 UTC 2013



Current Nova uses the v1 APIs [1] of Glance when taking snapshots, which
can cause issues when v2 of the API is used to place properties on the
image longer than 255 characters [2].

Summarizing bug 1117923:

1) A new migration script is needed in nova to change the "varchar(255)"
datatype on the "value" column in nova.instance_system_metadata to "text"
to match the "text" datatype on the value column in glance.image_properties

2) Implement create/update in the v2 implementation used by glanceclient

3) Change nova/image/glance.py to use v2 of glanceclient.

My understanding is that the the v2 API will not be enabled by default in
this release.  Consequently, Nova cannot assume that the v2 API will be
present.  I proposed up a patch [3] that provided a configuration option
for the administrator to change if the Glance endpoint supported v2.  It is
not the ideal solution, rather Rusell Bryant correctly identified it as
using the service catalog to discover the API to use.

What is the right fix this late in the development cycle?  At first pass,
it seems that the negotiation between the client / server and / or Keystone
on the API version would be a non-trival code effort and require
substantial changes to nova/image/glance.py to exploit.  The current patch
is fairly trivial at the expense of introducing a config option that is
likely to be deprecated in the next release or two.

[1] https://github.com/openstack/nova/blob/master/nova/image/glance.py#L286
[2] https://bugs.launchpad.net/nova/+bug/1117923
[3] https://review.openstack.org/#/c/21850/

Michael

-------------------------------------------------
Michael Fork
OpenStack Architect, Cloud Solutions and OpenStack Development
IBM Systems & Technology Group
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130215/c38e93a9/attachment.html>


More information about the OpenStack-dev mailing list