Cinder - check available space should not run if ceph is backend

Bug #1734027 reported by Josue Palmerin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
High
Denis Meltsaykin

Bug Description

Detailed bug description:
 Cinder checks for available space before calling clone_image. We don’t need to check out the available local disk where we don’t use any QCOW2 images. The correct code should be checking the available disk only it needs to do for QCOW2 images, not for RAW images

Steps to reproduce:
 1. Deploy MOS 9.2 with Ceph
 2. Create a very large volume

Expected results:
 Very large volume

Actual result:
 Volume creation fails with error:
  <155>Nov 5 00:29:08 sj1dra1001 cinder-volume: 2017-11-05 00:29:08.170 27498 ERROR oslo_messaging.rpc.dispatcher [req-871455b0-1385-46a7-9305-406f104eaeb9 6021cf7259fe4b8991ffa6035541bf0c b280ec5e8a714253aa2fcd0f069cae63 - - -] Exception during message handling: Image 84a8ac82-63f7-468a-877c-fa2502b2d23e is unacceptable: There is no space to convert image.

Reproducibility:
 100%

Workaround:
 commented out calling check_available_space()

Changed in mos:
milestone: none → 9.x-updates
Changed in mos:
assignee: nobody → MOS Maintenance (mos-maintenance)
importance: Undecided → High
status: New → Confirmed
Changed in mos:
assignee: MOS Maintenance (mos-maintenance) → Denis Meltsaykin (dmeltsaykin)
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/cinder (9.0/mitaka)

Fix proposed to branch: 9.0/mitaka
Change author: Denis V. Meltsaykin <email address hidden>
Review: https://review.fuel-infra.org/37383

Changed in mos:
status: Confirmed → In Progress
Changed in mos:
milestone: 9.x-updates → 9.2-mu-4
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/cinder (9.0/mitaka)

Reviewed: https://review.fuel-infra.org/37383
Submitter: Pkgs Jenkins <email address hidden>
Branch: 9.0/mitaka

Commit: 88b49d45f03eba1c2471b5f94d21f333dc5a4029
Author: Denis V. Meltsaykin <email address hidden>
Date: Tue Dec 5 15:17:00 2017

Check for available space only when needed

When creating a volume from an image in several cases we can take
advantage of the cloning techniqe which does not involve the image
conversion. For example creating a volume in a ceph backend from
the image in the same ceph backend if the image has the "raw"
format. In this case we don't need to check for available space
in the `image_conversion_dir`, because there will not be any
conversion. Also, the unnecessary check could fail a big image to
volume uploading, despite the fact that no storage space is used.
This commit moves the check for space to the section where it is
more suitable.

Change-Id: Ibbeeeffd54e8d9f3a1b83416240579e15033bc9a
Closes-Bug: #1734027

Changed in mos:
status: In Progress → Fix Committed
Revision history for this message
Vladimir Jigulin (vjigulin) wrote :

Verified on mos9.2+mu4 proposed. Steps:
fallocate -l $((1024*1024*1024*4)) image.raw # create 4G container
glance image-create --file image.raw --name testimg --disk-format=raw --container-format=bare #upload it
cd /var/lib/cinder/conversion/
fallocate --length 6G stuff # fill partition with conversion dir
# /dev/dm-3 15G 13G 1.5G 90% /
#convert image to volume in horizon
Result without fix:
Image 5dd6b132-b3e4-4551-ad61-6ea921513580 is unacceptable: There is no space to convert image.
With fix:
Volume created without errors

Changed in mos:
status: Fix Committed → Fix Released
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.