Comment 0 for bug 1516083

Revision history for this message
zhangsong (zhangsong) wrote :

When I use image_utils.qemu_img_info method to get the virtual_size info of my image:

source = 'sheepdog:volume-1af1afa0-7820-4063-9b90-4fa6161a74a9'
image_size = qemu_img_info(source, run_as_root=True).virtual_size

an error occured:

2015-11-12 12:46:49.123 32474 ERROR oslo_messaging.rpc.dispatcher raise ValueError(_('Invalid input value "%s".') % details)
2015-11-12 12:46:49.123 32474 ERROR oslo_messaging.rpc.dispatcher ValueError: Invalid input value "unavailable".

But if I manually run the qemu_img info command, the virtual_size can be successfully acquired:

#qemu-img info sheepdog:volume-1af1afa0-7820-4063-9b90-4fa6161a74a9
image: sheepdog:volume-1af1afa0-7820-4063-9b90-4fa6161a74a9
file format: raw
virtual size: 10G (10737418240 bytes)
disk size: unavailable

# qemu-img info -f rbd rbd:data/foo
image: rbd:data/foo
file format: rbd
virtual size: 10G (10737418240 bytes)
disk size: unavailable
cluster_size: 4194304

This occured both in ceph and sheepdog. We can see that disk size info is unavailable, but the virtual size really exists. So something is wrong.