[Bug 1692446] Re: cinder upload-to-image doesn't copy os_type property
Edward Hope-Morley
edward.hope-morley at canonical.com
Mon May 22 10:39:52 UTC 2017
@seyeongkim can you please provide the following info:
* specify which LP bug the first patch comes from
* specify which versions you are targeting (is it just Trusty Icehouse?) - Kilo is still supported but i don't think the second patch is in Kilo.
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to cinder in Ubuntu.
https://bugs.launchpad.net/bugs/1692446
Title:
cinder upload-to-image doesn't copy os_type property
Status in Cinder:
Fix Released
Status in cinder package in Ubuntu:
Fix Released
Bug description:
[Description]
on Trusty Icehouse
When copy volume to image using upload-to-image, it doesn't copy
os_type properly.
[Test Case]
deploy trusty openstack environment.
$glance image-create --name="trusty" --visibility public
--os_type=linux --progress --container-format=bare --disk-format=qcow2
< ~/images/trusty-server-cloudimg-amd64-disk1.img
get image id
$cinder create --image-id [IMAGEID] --display-name T 5
waiting until finished.
$cinder upload-to-image T T1
check the T1's information if there is os_type is set properly
[Regression Potential]
Regression potential is low. these patches are already in upstream.
[Other Info]
related LP bugs
https://bugs.launchpad.net/openstack-manuals/+bug/1329419
https://bugs.launchpad.net/cinder/+bug/1527324
Below commits fix this issue.
[1]
commit dcf4b10cd1e16b28ab388def658e77cc9a34d766
Author: PranaliDeore <pranali.deore at nttdata.com>
Date: Tue May 6 04:04:45 2014 +0000
Copy custom properties to image from volume
Presently after copying an image to volume, all properties
of the image are getting copied properly but while creating
image back from volume, it doesn't copy custom properties
to the image.
At present in volume-glance-metadata table all the properties
of volume are stored as key and value. Because of this it is
difficult to differentiate between core and custom properties.
To overcome this, I have added a new option
'glance_core_properties' in cinder.conf. This option defines
all core properties of an image. This way, it's easy to separate
core and custom properties from the glance_volume_metadata and add
custom property to the newly created image.
For Example:
glance_core_properties = 'checksum', 'container_format',
'disk_format', 'image_name', 'image_id', 'min_disk',
'min_ram', 'name', 'size'
DocImpact: Added 'glance_core_properties' to distinguish the
core and custom properties as discussed above in cinder.conf
blueprint: restrict-uploading-volume-to-image
Change-Id: I786edbc6e54b3d06ef679a71e22676d2f88e7307
[2]
commit edf00659aadaf898ae679f358a6ea8533f4dd891
Author: Tomoki Sekiyama <tomoki.sekiyama.qu at hitachi.com>
Date: Fri Dec 18 20:38:36 2015 +0900
Fix volume upload failure with glance_api_version=2
When the volume has additional image properties, upload-to-image
using glance API version 2 will fail with the following error.
Failed validation u'type' in schema[u'additionalProperties']:
{u'type': u'string'}
This is due to non core properties passed as a dict to the key
'properties'. It is valid in Image API v1, but the additional
properties must be passed just like core properties in v2.
Change-Id: Ib32c92a8be170b5f43a34e69155398dfc1a8cbcd
Closes-Bug: #1527324
To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1692446/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list