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:

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

The error:

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 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:

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

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

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