Comment 7 for bug 1200800

Revision history for this message
Jay Bryant (jsbryant) wrote :

I have spent some more time looking at this. First, looking back through the logs to when Avishay put the copy volume<->image code in, back in January, I don't see any check-ins that obviously remove additional checks that were being made in the iSCSI path for the image type. I also don't think that adding a check in for copy_image_to_volume is unprecedented as copy_volume_to_image calls image_utils.upload_volume and the first thing it does is to check the image type without qemu-img.

Also, a move away from being dependent upon qemu-img is also not unprecedented given that Glance has already made changes to move away from requiring qemu-img. https://bugs.launchpad.net/nova/+bug/1131033 .

It seems to me I should be able to do an self.image_service.show() to get the image_meta information. If the image_type is RAW we shouldn't call fetch_to_raw() but call fetch() instead.

If you would prefer to reduce the number of cases where this new path would be used, we could check for the existence of qemu-img and only use this path in the cases where qemu-img doesn't exist.

With regards to Avishay's question about how do we verify the image type. If we don't have qemu-img it doesn't seem that we can. If we don't have qemu-img, it seems we need to try the image_type we find. On PPC this shouldn't be a big issue given that only RAW is supported.

Why am I pushing on this? There are platforms that don't have qemu-img by default and due to the licensing of qemu-img it is difficult to make this work without some sort of customer intervention like installing qemu-img by hand which isn't desirable if we can work around the issue in code.