Image volume clone failure on upload-to-image with image_upload_use_cinder_backend=True

Bug #1529762 reported by Tomoki Sekiyama
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Tomoki Sekiyama

Bug Description

When "image_upload_use_cinder_backend = True" is specified to the volume backend, and the Glance cinder store is enabled, upload-to-image command fails with the following error.

2015-12-29 12:45:34.921 ERROR cinder.volume.manager [req-e71ea2a1-17ae-4861-82f3-6e9ccb24fdea c7335ee0af3b49d6915c5be914be1e59 5a100aa2b9a0460fbc8d4b1a170d281a] Create clone_image_volume: 7e2cb904-4239-4bb1-837f-d7e3b4d7b371for image 7054d3aa-cafc-44e5-825a-320607d31d5a, failed (Exception: An object of type VolumeAttachmentList is required in field volume_attachment, not a )
2015-12-29 12:45:34.921 TRACE cinder.volume.manager Traceback (most recent call last):
2015-12-29 12:45:34.921 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/volume/manager.py", line 1092, in _clone_image_volume
2015-12-29 12:45:34.921 TRACE cinder.volume.manager image_volume = objects.Volume(context=ctx, **new_vol_values)
2015-12-29 12:45:34.921 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/objects/volume.py", line 117, in __init__
2015-12-29 12:45:34.921 TRACE cinder.volume.manager super(Volume, self).__init__(*args, **kwargs)
2015-12-29 12:45:34.921 TRACE cinder.volume.manager File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 303, in __init__
2015-12-29 12:45:34.921 TRACE cinder.volume.manager setattr(self, key, kwargs[key])
2015-12-29 12:45:34.921 TRACE cinder.volume.manager File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 73, in setter
2015-12-29 12:45:34.921 TRACE cinder.volume.manager field_value = field.coerce(self, name, value)
2015-12-29 12:45:34.921 TRACE cinder.volume.manager File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/fields.py", line 190, in coerce
2015-12-29 12:45:34.921 TRACE cinder.volume.manager return self._type.coerce(obj, attr, value)
2015-12-29 12:45:34.921 TRACE cinder.volume.manager File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/fields.py", line 595, in coerce
2015-12-29 12:45:34.921 TRACE cinder.volume.manager 'valtype': obj_name})
2015-12-29 12:45:34.921 TRACE cinder.volume.manager ValueError: An object of type VolumeAttachmentList is required in field volume_attachment, not a
2015-12-29 12:45:34.921 TRACE cinder.volume.manager

This is due to unnecessary attributes specified in the volume creation params, such as '' or 'volume_attachment' or 'consistencygroup'.

Changed in cinder:
assignee: nobody → Tomoki Sekiyama (tsekiyama)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit 16f1dc862e9771f7b26d094bdcf41791c9fc5a8c
Author: Tomoki Sekiyama <email address hidden>
Date: Tue Dec 29 12:35:52 2015 +0900

    Fix image volume creation error

    When "image_upload_use_cinder_backend = True" is specified to
    the volume backend and the Glance cinder store is enabled,
    upload-to-image command fails with the following error:

      Create clone_image_volume: xxx for image xxx failed
      (Exception: An object of type VolumeAttachmentList is required
       in field volume_attachment, not a )

    This is due to unnecessary attributes specified in the volume
    params, such as 'volume_attachment' or 'consistencygroup'.
    This patch removes the unnecessary attributes from the params.

    Change-Id: Ia416cb6686312e1591de7fe40a7ce7d6aa2fce7d
    Closes-Bug: #1529762
    Related-Bug: #1528087

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/cinder 8.0.0.0b3

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

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.