[openstack-dev] [nova] "correct" API for getting image metadata for an instance ?

Feodor Tersin ftersin at cloudscaling.com
Thu May 28 09:22:59 UTC 2015


I mean the case:
- an image has long property AAA and non inheritable property BBB;
- an instance based on the image stores truncated AAA and full BBB;
- utils.get_image_from_system_metadata returns truncated AAA but not BBB;
- compute.utils.get_image_metadata updates the result of
utils.get_image_from_system_metadata by the image metadata and returns full
AAA and added BBB.

This is the difference i mean.


On Thu, May 28, 2015 at 11:59 AM, Daniel P. Berrange <berrange at redhat.com>
wrote:

> On Thu, May 28, 2015 at 11:55:59AM +0300, Feodor Tersin wrote:
> > +1
> > But we should answer the following question before switching libvirt to
> > utils.get_image_from_system_metadata.
> >
> > Some differences of utils.get_image_from_system_metadata from
> > compute.utils.get_image_metadata are:
> > 1) Instance metadata has a restriction of property length: long data is
> > stripped to 255 chars.
> > This may cause a fault on loading serialized structure from a metadata
> > property.
> >
> > 2) utils.get_image_from_system_metadata skips properties defined by
> > CONF.non_inheritable_image_properties
> >
> > So the question is: are these facts important for libvirt?
>
> compute.utils.get_image_metadata calls utils.get_image_from_system_metadata
> so those don't cause any difference in behaviour.
>
> Regards,
> Daniel
> --
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/
> :|
> |: http://libvirt.org              -o-             http://virt-manager.org
> :|
> |: http://autobuild.org       -o-         http://search.cpan.org/~danberr/
> :|
> |: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc
> :|
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150528/9984a831/attachment.html>


More information about the OpenStack-dev mailing list