Comment 2 for bug 873156

Revision history for this message
JuanPM (juanpm) wrote :

I had the same issue. I've tried the workaround proposed by Valery, but it doesn't work for me using Diablo release,

nova version 2011.3 (2011.3-nova-milestone-tarball:tarmac-20110922115702-k9nkvxqzhj130av2)
glance version 2011.3

In my case, the problemas appears after doing the next steps:

 1) First, I've uploaded the images using euca-upload-bundle. Below is my image metadata, displayed by glance:

Id: 3
Public: No
Name: None
Status: active
Size: 5370494976
Disk format: ami
Container format: ami
Minimum Ram Required (MB): 0
Minimum Disk Required (GB): 0
Property 'image_location': mybucket/ubuntu-10.10-jeos-0.1rev14.img.manifest.xml
Property 'image_state': available
Property 'project_id': CloudZEN
Property 'architecture': x86_64

2) Then, I create a new instance based on this image, and do some changes.

3) After that I tried to capture a new image with "nova image-create" command". Below the nova-comput.log optput:

2011-10-17 16:49:43,765 DEBUG nova.compute.manager [-] Checking state of instance-00000003 from (pid=622) _get_power_state /usr/lib/python2.7/dist-packages/nova/compute/manager.py:188
2011-10-17 16:49:44,640 AUDIT nova.compute.manager [fcb49d9e-ef04-41f0-a2aa-c2e509a29853 sensei CloudZEN] instance 3: snapshotting
2011-10-17 16:51:28,499 DEBUG nova.utils [-] Running cmd (subprocess): qemu-img convert -f qcow2 -O qcow2 -s 0f5fa0a9eaad4665a910c5e6f5b839d6 /var/lib/nova/instances/instance-00000003/disk /tmp/tmp8tsZ4f/0f5fa0a9eaad4665a910c5e6f5b839d6 from (pid=622) execute /usr/lib/python2.7/dist-packages/nova/utils.py:165
2011-10-17 16:51:28,548 INFO nova.compute.manager [-] Updating host status
2011-10-17 16:52:31,843 ERROR nova.exception [-] Uncaught exception
(nova.exception): TRACE: Traceback (most recent call last):
(nova.exception): TRACE: File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 98, in wrapped
(nova.exception): TRACE: return f(*args, **kw)
(nova.exception): TRACE: File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/connection.py", line 466, in snapshot
(nova.exception): TRACE: image_file)
(nova.exception): TRACE: File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 287, in update
(nova.exception): TRACE: image_meta = client.update_image(image_id, image_meta, data)
(nova.exception): TRACE: File "/usr/lib/python2.7/dist-packages/glance/client.py", line 157, in update_image
(nova.exception): TRACE: res = self.do_request("PUT", "/images/%s" % image_id, body, headers)
(nova.exception): TRACE: File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 140, in do_request
(nova.exception): TRACE: method, action, body=body, headers=headers, params=params)
(nova.exception): TRACE: File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 230, in _do_request
(nova.exception): TRACE: raise exception.Invalid(res.read())
(nova.exception): TRACE: Invalid: 400 Bad Request
(nova.exception): TRACE:
(nova.exception): TRACE: The server could not comply with the request since it is either malformed or otherwise incorrect.
(nova.exception): TRACE:
(nova.exception): TRACE: Failed to update image metadata. Got error: 400 Bad Request The server could not comply with the request since it is either malformed or otherwise incorrect. Failed to update image metadata. Got error: Invalid mix of disk and container formats. When setting a disk or container format to one of 'ami', 'ari', or 'ami', the container and disk formats must match.
(nova.exception): TRACE:
2011-10-17 16:52:31,956 ERROR nova.rpc [-] Exception during message handling
(nova.rpc): TRACE: Traceback (most recent call last):
(nova.rpc): TRACE: File "/usr/lib/python2.7/dist-packages/nova/rpc/impl_kombu.py", line 620, in _process_data
(nova.rpc): TRACE: rval = node_func(context=ctxt, **node_args)
(nova.rpc): TRACE: File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 98, in wrapped
(nova.rpc): TRACE: return f(*args, **kw)
(nova.rpc): TRACE: File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 655, in snapshot_instance
(nova.rpc): TRACE: self.driver.snapshot(context, instance_ref, image_id)
(nova.rpc): TRACE: File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 129, in wrapped
(nova.rpc): TRACE: raise Error(str(e))
(nova.rpc): TRACE: Error: 400 Bad Request
(nova.rpc): TRACE:
(nova.rpc): TRACE: The server could not comply with the request since it is either malformed or otherwise incorrect.
(nova.rpc): TRACE:
(nova.rpc): TRACE: Failed to update image metadata. Got error: 400 Bad Request The server could not comply with the request since it is either malformed or otherwise incorrect. Failed to update image metadata. Got error: Invalid mix of disk and container formats. When setting a disk or container format to one of 'ami', 'ari', or 'ami', the container and disk formats must match.

4) I've tried modifying the image metdata in glance, using the flag snapshot_image_format (tried "qcow2" and "raw" , or the domain settings with virsh, but the problem persist.