Nested quota check allocated > 0 on delete

Bug #1554173 reported by Ryan McNair
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Ryan McNair
Mitaka
Fix Released
High
Eric Harney
Newton
Fix Released
High
Ryan McNair

Bug Description

Because of https://bugs.launchpad.net/cinder/+bug/1552944, if there's an update to / from a -1 limit while there's volumes being created / deleted on the project, the allocated space updates may get double counted. Because this double counting could make the allocated value < 0, and currently this would make it so you can't delete the quota of a project.

We should try to handle this case as gracefully as possibly, and not disallow the deletion of a quota if the allocated is < 0

Tags: quota
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/289521

Changed in cinder:
assignee: nobody → Ryan McNair (rdmcnair)
status: New → In Progress
Jay Bryant (jsbryant)
Changed in cinder:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/289521
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=edff6fbf5d80dba05ab57b557ee25f44098bdf13
Submitter: Jenkins
Branch: master

commit edff6fbf5d80dba05ab57b557ee25f44098bdf13
Author: Ryan McNair <email address hidden>
Date: Mon Mar 7 18:42:22 2016 +0000

    Don't disallow quota deletion if allocated < 0

    Due to the race condition http://bugs.launchpad.net/cinder/+bug/1552944,
    it's possible that a volume delete on a project at the same time as a
    change to/from a -1 limit on the project could double count the change
    in allocated value. This has the possibility to set allocated < 0, and
    in order to handle this situation as gracefully as possible, we should
    not disallow quota deletion in the case that allocated < 0.

    Change-Id: Ic35ff9671024aa1cecc04b205d1b7cba56bbea61
    Closes-Bug: #1554173

Changed in cinder:
status: New → Fix Released
Eric Harney (eharney)
tags: added: quota
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/320553

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/mitaka)

Reviewed: https://review.openstack.org/320553
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=6e7c6a331bb700523b93e1c6564c5179f495b2b6
Submitter: Jenkins
Branch: stable/mitaka

commit 6e7c6a331bb700523b93e1c6564c5179f495b2b6
Author: Ryan McNair <email address hidden>
Date: Mon Mar 7 18:42:22 2016 +0000

    Don't disallow quota deletion if allocated < 0

    Due to the race condition http://bugs.launchpad.net/cinder/+bug/1552944,
    it's possible that a volume delete on a project at the same time as a
    change to/from a -1 limit on the project could double count the change
    in allocated value. This has the possibility to set allocated < 0, and
    in order to handle this situation as gracefully as possible, we should
    not disallow quota deletion in the case that allocated < 0.

    Change-Id: Ic35ff9671024aa1cecc04b205d1b7cba56bbea61
    Closes-Bug: #1554173
    (cherry picked from commit edff6fbf5d80dba05ab57b557ee25f44098bdf13)

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/cinder 9.0.0.0b1

This issue was fixed in the openstack/cinder 9.0.0.0b1 development milestone.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/cinder 8.1.0

This issue was fixed in the openstack/cinder 8.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.