Fix available space checking for image conversion

Cinder checks if there is enough free space to convert image from qcow
to raw format before uploading it into the volume. This patch fixes
the issue when we try to compare GiB to KiB.

Change-Id: I18b890ab1a73e0e7e9e626c7f896486fdd1f6d75
Closes-Bug: #1737551
This commit is contained in:
Ivan Kolodyazhny 2017-12-11 16:06:05 +02:00
parent aade6e01fa
commit 66cc0d2429
1 changed files with 1 additions and 1 deletions

View File

@ -448,7 +448,7 @@ def fetch_to_volume_format(context, image_service,
# NOTE(e0ne): check for free space in destination directory before
# image conversion.
check_available_space(dest, virt_size, image_id)
check_available_space(dest, data.virtual_size, image_id)
# NOTE(jdg): I'm using qemu-img convert to write
# to the volume regardless if it *needs* conversion or not