Cinder checking available space into wrong way

Bug #1737551 reported by Ivan Kolodyazhny
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Ivan Kolodyazhny
Mirantis OpenStack
Fix Released
High
Ivan Kolodyazhny

Bug Description

Cinder checking available space into wrong way:

virt_size in Gigs
free space in bytes

/usr/lib/python2.7/dist-packages/cinder/image/image_utils.py
~316
virt_size = data.virtual_size / units.Gi

added before check_available_space(dest, virt_size, image_id)

LOG.warning("dest:%s, virt_size:%s, data_virtual_size:%s, image_id:%s" %(dest,
virt_size, data.virtual_size, image_id))

added into check_available_space
LOG.warning("free space:%s, image_size:%s, units.Gi:%s" %(free_space,
image_size, units.Gi))

Log file: http://paste.openstack.org/show/628622/

Ivan Kolodyazhny (e0ne)
Changed in cinder:
assignee: nobody → Ivan Kolodyazhny (e0ne)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/527097

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/527097
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=66cc0d2429bddf0c983c6969a70b5cd1ea41e086
Submitter: Zuul
Branch: master

commit 66cc0d2429bddf0c983c6969a70b5cd1ea41e086
Author: Ivan Kolodyazhny <email address hidden>
Date: Mon Dec 11 16:06:05 2017 +0200

    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

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
Denis Meltsaykin (dmeltsaykin) wrote :
Changed in mos:
milestone: none → 9.2-mu-4
assignee: nobody → Ivan Kolodyazhny (e0ne)
importance: Undecided → High
status: New → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/530966

Revision history for this message
Vladimir Jigulin (vjigulin) wrote :

The root cause of a problem is clear and is fixed obviously. Decided to skip verification and release.

Changed in mos:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/pike)

Reviewed: https://review.openstack.org/530966
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=fb7d962937b42d53f9bcd4eda60afa7db2997b7e
Submitter: Zuul
Branch: stable/pike

commit fb7d962937b42d53f9bcd4eda60afa7db2997b7e
Author: Ivan Kolodyazhny <email address hidden>
Date: Mon Dec 11 16:06:05 2017 +0200

    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
    (cherry picked from commit 66cc0d2429bddf0c983c6969a70b5cd1ea41e086)
    Conflicts:
     cinder/image/image_utils.py

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 12.0.0.0b3

This issue was fixed in the openstack/cinder 12.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 11.1.0

This issue was fixed in the openstack/cinder 11.1.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.