Ramblings of Linux openstack & ceph

Cinder - Cannot Upload Volume to Image

| Comments

Supporting a user today we hit a bug that provents the user from uploading volume to image using the dahsboard. As always with the dashboard the error is not helpful but we know this will be fixed int he ‘M’ release cycle.

Using the command line as follows we got a much better error message:

1
cinder upload-to-image 5a6a6154-4cb0-4e5e-ade4-0f497e7f4fae CodeClub

The error:

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

We tracked this error back to LP Bug 1527324, And found a fix had been commited into openstack/cinder 8.0.0.0b2 development milestone, But this did not help us in production today.

So the work around, We first had to list the image to via the meta data:

1
cinder show 5a6a6154-4cb0-4e5e-ade4-0f497e7f4fae | grep -i meta

Then we can loop over the meta data items and remove them:

1
for i in container_format hw_qemu_guest_agent disk_format hw_scsi_model image_id min_ram checksum min_disk hw_disk_bus size ; do cinder image-metadata 5a6a6154-4cb0-4e5e-ade4-0f497e7f4fae unset $i ; done

This then enabled the image to be created from the volume

Comments