commit 7cf6d6457c74a63ec7df282c402fcd31a60a12af
Author: zhangsong <email address hidden>
Date: Sat Nov 14 00:44:53 2015 +0800
Fix the bug of can't get the desired image info
When we use 'qemu-img info' command to get image info, some kinds
of image may show an 'unavailable' disk size. For example:
$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
The current code didn't consider 'unavailable' size, and it will
raise a ValueError in this case. This patch fixed this bug by
adding the judgment of 'unavailable' size.
Reviewed: https:/ /review. openstack. org/245241 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=7cf6d6457c7 4a63ec7df282c40 2fcd31a60a12af
Committed: https:/
Submitter: Jenkins
Branch: master
commit 7cf6d6457c74a63 ec7df282c402fcd 31a60a12af
Author: zhangsong <email address hidden>
Date: Sat Nov 14 00:44:53 2015 +0800
Fix the bug of can't get the desired image info
When we use 'qemu-img info' command to get image info, some kinds
of image may show an 'unavailable' disk size. For example:
$qemu-img info sheepdog: volume- 1af1afa0- 7820-4063- 9b90-4fa6161a74 a9 volume- 1af1afa0- 7820-4063- 9b90-4fa6161a74 a9
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
The current code didn't consider 'unavailable' size, and it will
raise a ValueError in this case. This patch fixed this bug by
adding the judgment of 'unavailable' size.
Change-Id: Ic5f3b80e172baa afc07432319f8aa 24bf117b392
Closes-Bug: #1516083