Comment 6 for bug 1178333

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

Reviewed: https://review.openstack.org/49301
Committed: http://github.com/openstack/trove/commit/99f7c104022aeaa61fe0710d2a8f8fcc09c2b09a
Submitter: Jenkins
Branch: master

commit 99f7c104022aeaa61fe0710d2a8f8fcc09c2b09a
Author: Steve Leon <email address hidden>
Date: Wed Oct 2 12:35:39 2013 -0700

    Fix quota issue where usages can drop to negative value

    This is caused by an exception occuring in the model when creating
    and instance. When this happens, the quota rolls back but the DB
    record, created for that instance, does not. This issue is NOT fixed
    in this patch but depends on
    BP https://blueprints.launchpad.net/trove/+spec/security-groups-workflow-update

    What this fix does is adds a check that prevents quota usages drop below 0.

    Also it fixes a bug where the reserve quota was being set and not added.
    This causes problem when multiple requests are sent at the same time
    and causes race condition issues.

    Fixes bug 1178333

    Change-Id: I1c64941815b91e58d79b17d7a6e69c15c1daaf36