Cannot upload volume to image

Bug #1527324 reported by Yuriy Nesenenko on 2015-12-17
56
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Cinder
Undecided
Tomoki Sekiyama

Bug Description

Cannot upload volume to image if the volume was created from image with description.

Steps to reproduce:
    * Upload volume to image
    * Set image description to some non empty string (e.g."testing")
    * Create volume from image
    * Try to upload volume as image back to Glance

Error: Unable to upload volume to image for volume "..."

Yuriy Nesenenko (ynesenenko) wrote :

All steps were down using Horizon.

I found duplicate of this bug. https://bugs.launchpad.net/cinder/+bug/1503904
I could reproduce this at master branch.

----
its imposible to upload to images from volumes , when the Volume have description

ERROR: Unable to set 'properties' to '{u'description': u''}'. Reason: {u'description': u''} is not of type u'string'

Failed validating u'type' in schema[u'additionalProperties']:
    {u'type': u'string'}

On instance['properties']:
    {u'description': u''} (HTTP 400) (Request-ID: req-efbcb235-ba54-43c2-8042-2dca0dc2644a)

Changed in cinder:
assignee: nobody → Mitsuhiro Tanino (mitsuhiro-tanino)

Fix proposed to branch: master
Review: https://review.openstack.org/259405

Changed in cinder:
assignee: Mitsuhiro Tanino (mitsuhiro-tanino) → Tomoki Sekiyama (tsekiyama)
status: New → In Progress

Reviewed: https://review.openstack.org/259405
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=edf00659aadaf898ae679f358a6ea8533f4dd891
Submitter: Jenkins
Branch: master

commit edf00659aadaf898ae679f358a6ea8533f4dd891
Author: Tomoki Sekiyama <email address hidden>
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

Changed in cinder:
status: In Progress → Fix Released

This issue was fixed in the openstack/cinder 8.0.0.0b2 development milestone.

tobe (chendihao) wrote :

Thanks for the fix in master. Is it possible to backport in liberty branch because all of us really need this?

Reviewed: https://review.openstack.org/293799
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=01555a940d0f84d2fbc98cd10905ca6aabe00c48
Submitter: Jenkins
Branch: stable/liberty

commit 01555a940d0f84d2fbc98cd10905ca6aabe00c48
Author: Tomoki Sekiyama <email address hidden>
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
    (cherry picked from commit edf00659aadaf898ae679f358a6ea8533f4dd891)

tags: added: in-stable-liberty

This issue was fixed in the openstack/cinder 7.0.2 release.

This issue was fixed in the openstack/cinder 7.0.2 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers