Resource reservation isn't rolled back properly for certain failures during Volume Create

Bug #1070258 reported by Rongze Zhu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Rongze Zhu

Bug Description

This bug is the same as https://bugs.launchpad.net/nova/+bug/1065092.

The resources are reserved at the start of the volume creation, but are never rolled back/removed if certain exceptions occur, for example if you pass an image_id which its size is larger than the size of the volume , the reservation counter will increase and not be removed.

You can recreate this pretty simply by performing the following (assuming that the size of image is larger than 1):

zhu@ubuntu:~/git/devstack$ cinder create --image-id=224211da-66f1-4ae3-be72-52c574749383 1
ERROR: Invalid input received: Size of specified image is larger than volume size. (HTTP 400) (Request-ID: req-6f6d5ca3-129f-4e09-ab5f-2e6783dd799b)
...................
zhu@ubuntu:~/git/devstack$ cinder create --image-id=224211da-66f1-4ae3-be72-52c574749383 1
ERROR: Invalid input received: Size of specified image is larger than volume size. (HTTP 400) (Request-ID: req-4f4ee5f0-c2e2-4347-b971-7069d0d055fb)
zhu@ubuntu:~/git/devstack$ cinder create --image-id=224211da-66f1-4ae3-be72-52c574749383 1
ERROR: VolumeLimitExceeded: Maximum number of volumes allowed (10) exceeded (HTTP 413) (Request-ID: req-296d93ed-53ec-4cb1-8530-104220052d41)

Rongze Zhu (zrzhit)
Changed in cinder:
assignee: nobody → Rongze Zhu (zrzhit)
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/14670

Changed in cinder:
status: New → In Progress
Changed in cinder:
importance: Undecided → High
tags: added: folsom-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/14670
Committed: http://github.com/openstack/cinder/commit/628adc99b41c097b0c071087a274ded850ff7df5
Submitter: Jenkins
Branch: master

commit 628adc99b41c097b0c071087a274ded850ff7df5
Author: Rongze Zhu <email address hidden>
Date: Tue Oct 23 12:12:30 2012 +0000

    Rollback for resources during volume creation failure

    Fixes bug #1070258

    Add a single QUOTAS.rollback for all exceptions. Ensure that no stale
    "reservations" are left in place after a failed volume creation.

    Change-Id: Iedb193b213b8ee700a5765278ac4d00dac66d53a

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → grizzly-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: grizzly-1 → 2013.1
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.