update quota multi-value in one request, half done half failed

Bug #1291199 reported by kexiaodong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Davanum Srinivas (DIMS)

Bug Description

Update quota multi-value in one request is not an atomicity operation.
I update quota(floating_ips, key_pairs, instances, ram) in one request, and then get response code 400, because of ram should not less than used. That is ok. The problem is that floating_ips, key_pairs, instances have updated.
I think the update operation should be an atomicity operation. When update failed, we should roll back all the change on quota.

Changed in nova:
assignee: nobody → Leandro Ignacio Costantino (leandro-i-costantino)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: New → In Progress
tags: added: api
Changed in nova:
importance: Undecided → Low
Revision history for this message
Sean Dague (sdague) wrote :

Stalled upstream

Changed in nova:
status: In Progress → Confirmed
assignee: Leandro Ignacio Costantino (leandro-i-costantino) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Sean Dague (<email address hidden>) on branch: master
Review: https://review.openstack.org/79904
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Joe Gordon (jogo)
tags: added: quotas
Revision history for this message
Joe Gordon (jogo) wrote :

https://review.openstack.org/#/c/79904/ was abandoned and just needs to be restored and fixed up

tags: added: low-hanging-fruit
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Davanum Srinivas (DIMS) (dims-v)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Joe Gordon (<email address hidden>) on branch: master
Review: https://review.openstack.org/79904
Reason: replaced by https://review.openstack.org/#/c/163668/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/163668
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a16fa20d84ccded13880a9cef74732e7f2776b87
Submitter: Jenkins
Branch: master

commit a16fa20d84ccded13880a9cef74732e7f2776b87
Author: Davanum Srinivas <email address hidden>
Date: Wed Mar 11 21:31:51 2015 -0400

    Verify all quotas before updating the db

    Update quota multi-value in one request is not an atomicity operation,
    so even if a quota is invalid (Ex: ram less than already used), some values
    may change but the return code is 400.

    This patch will first check all the quotas before hitting trying to update
    the quotas.

    First submitted as part of changeset:
    I22171c1f1f8171c502f2a9d710cfac38f5b38d85

    Co-Authored-By: Leandro I. Costantino <email address hidden>
    Closes-Bug: #1291199
    Change-Id: I76aa20c0254666b59b93497a63c81981ada0a7b2

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-3 → 2015.1.0
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.