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

2015-06-01 Thread John Garbutt
On 28 May 2015 at 19:26, Vladik Romanovsky vladik.romanov...@enovance.com wrote: As part of the work to object-ify the image metadata dicts, I'm looking at the current way the libvirt driver fetches image metadata for an instance, in cases where the compute manager hasn't already passed it

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

2015-05-28 Thread Vladik Romanovsky
As part of the work to object-ify the image metadata dicts, I'm looking at the current way the libvirt driver fetches image metadata for an instance, in cases where the compute manager hasn't already passed it into the virt driver API. I see 2 methods that libvirt uses to get the image

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

2015-05-28 Thread Feodor Tersin
+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

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

2015-05-28 Thread Sahid Orentino Ferdjaoui
On Wed, May 27, 2015 at 02:59:10PM +0100, Daniel P. Berrange wrote: As part of the work to object-ify the image metadata dicts, I'm looking at the current way the libvirt driver fetches image metadata for an instance, in cases where the compute manager hasn't already passed it into the virt

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

2015-05-28 Thread Daniel P. Berrange
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

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

2015-05-28 Thread Feodor Tersin
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

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

2015-05-28 Thread Daniel P. Berrange
On Thu, May 28, 2015 at 12:22:59PM +0300, Feodor Tersin wrote: 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; -

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

2015-05-28 Thread Feodor Tersin
Yes, my mistake. I missed that utils.get_image_from_system_metadata just converts a passed metadata, but do not get metadata from the instance. So non-inhertable properties are omitted in both result sets. But compute.utils.get_image_metadata returns not trucated long properties. It reads