Failed to get image info
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Invalid
|
Low
|
Unassigned | ||
oslo-incubator |
Won't Fix
|
Undecided
|
zhangsong |
Bug Description
I try to use imageutils.
source = 'sheepdog:
image_size = qemu_img_
The qemu_img_info() method is defined in cinder.
def qemu_img_info(path, run_as_root=True):
"""Return a object containing the parsed output from qemu-img info."""
cmd = ('env', 'LC_ALL=C', 'qemu-img', 'info', path)
if os.name == 'nt':
cmd = cmd[2:]
out, _err = utils.execute(*cmd, run_as_
return imageutils.
an error occured:
2015-11-12 12:46:49.123 32474 ERROR oslo_messaging.
2015-11-12 12:46:49.123 32474 ERROR oslo_messaging.
But if I manually run the qemu_img info command, the virtual_size can be successfully acquired:
#qemu-img info sheepdog:
image: sheepdog:
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. Why I can't get the 'virtual size' info which is really exist?
The reason is imageutils.
I think there is an mistake in imageutils.
I have tested both in sheepdog and ceph, they all show the disk_size info like 'disk size: unavailable', so I think we need to consider this as a normal scenario.
Changed in oslo-incubator: | |
assignee: | nobody → zhangsong (zhangsong) |
description: | updated |
Changed in cinder: | |
assignee: | nobody → zhangsong (zhangsong) |
Changed in cinder: | |
importance: | Undecided → Low |
All code in oslo-incubator will be deleted soon. Please fix this up in cinder itself.
http:// markmail. org/message/ kgdnukenoni3hbm w
thanks,
dims