[SRU] Glance image properties not copied to cinder volume with glance V2 API
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
Anton Arefiev | ||
Glance Client |
Fix Released
|
High
|
Alexander Tivelkov | ||
Kilo |
Fix Committed
|
High
|
Mike Fedosin | ||
Ubuntu Cloud Archive |
Invalid
|
Undecided
|
Seyeong Kim | ||
Icehouse |
Fix Committed
|
Undecided
|
Seyeong Kim | ||
Kilo |
Fix Released
|
Undecided
|
Seyeong Kim | ||
cinder (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Trusty |
Fix Released
|
Medium
|
Seyeong Kim | ||
python-glanceclient (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Trusty |
Fix Released
|
Medium
|
Seyeong Kim |
Bug Description
[Description]
When a cinder volume is created from a glance image, the "properties" attached to the glance image are not copied to the cinder volume (in the volume_
[Test Case]
To illustrate, here is a glance image with a hw_vif_model property defined:
[root@controller-0 log(keystone_
+------
| Property | Value |
+------
| Property 'hw_vif_model' | avp |
| checksum | 2386997c1a85709
| container_format | bare |
| created_at | 2014-05-
| deleted | False |
| disk_format | raw |
| id | 78e935d4-
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | wrl5-avp |
| owner | 376000978ffb431
| protected | False |
| size | 507510784 |
| status | active |
| updated_at | 2014-05-
+------
When a volume is created (using glance V1 API) from this image (with "cinder create --image-id 2386997c1a85709
{u'container_
When a volume is created using the glance V2 API, the volume_
{u'container_
With debug logs turned on, the results of the image get from glance are different. For the glance V1 API:
May 25 12:49:48 localhost 2014-05-25 12:49:48.221 1773 DEBUG glanceclient.
With the glance V2 API:
May 25 12:07:15 localhost 2014-05-25 12:07:15.589 12689 DEBUG glanceclient.
The difference (other than the switch to the json encoding) is that the hw_vif_model is returned as a property in the V1 case and returned as a regular field in the V2 case. From a look at the cinder code, I suspect that the problem happens because the _extract_attributes function (in cinder/
def _extract_
IMAGE_
output = {}
for attr in IMAGE_ATTRIBUTES:
output[
return output
I don't know why the glance V2 API is returning the properties as regular attributes, but I expect that is what is causing the problem.
I am testing this in Havana, using the Ceph backend, but I don't expect the backend matters here.
[Regression Potential]
Regression potential is low. Patch is cherry-picked from upstream stable/liberty branch without any changes.
Changed in cinder: | |
status: | New → Confirmed |
no longer affects: | glance |
Changed in glance: | |
status: | Confirmed → In Progress |
Changed in cinder: | |
assignee: | Pranali Deore (pranali-deore) → Anton Arefiev (aarefiev) |
status: | Confirmed → In Progress |
Changed in glance: | |
milestone: | none → kilo-rc1 |
importance: | Undecided → High |
affects: | glance → python-glanceclient |
Changed in python-glanceclient: | |
milestone: | kilo-rc1 → none |
Changed in python-glanceclient: | |
status: | In Progress → Fix Committed |
Changed in cinder: | |
milestone: | none → liberty-2 |
status: | Fix Committed → Fix Released |
tags: | added: kilo-backport-potential |
no longer affects: | ubuntu |
Changed in python-glanceclient: | |
milestone: | none → 1.0.0 |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | liberty-2 → 7.0.0 |
no longer affects: | cloud-archive |
no longer affects: | ubuntu |
Changed in cinder (Ubuntu): | |
status: | New → Invalid |
Changed in python-glanceclient (Ubuntu): | |
status: | New → Invalid |
Changed in cinder (Ubuntu): | |
status: | Invalid → Fix Released |
Changed in python-glanceclient (Ubuntu): | |
status: | Invalid → Fix Released |
Changed in cloud-archive: | |
status: | New → In Progress |
assignee: | nobody → Seyeong Kim (xtrusia) |
tags: | added: openstack sts |
tags: | added: sts-sru |
Changed in cinder (Ubuntu): | |
importance: | Undecided → Medium |
Changed in cinder (Ubuntu Trusty): | |
importance: | Undecided → Medium |
Changed in python-glanceclient (Ubuntu): | |
importance: | Undecided → Medium |
Changed in python-glanceclient (Ubuntu Trusty): | |
importance: | Undecided → Medium |
summary: |
- Glance image properties not copied to cinder volume with glance V2 API + [SRU] Glance image properties not copied to cinder volume with glance V2 + API |
description: | updated |
Changed in cloud-archive: | |
status: | In Progress → Invalid |
tags: |
added: sts-sru-needed removed: sts-sru |
Hi, Bart
I think, it look a bug.