rackspace/melange — pull request #11 by Cerberus98 (2012-09-18 22:26:07+00:00)
Title: Adds fake quota support to Melange. Since Nova is incapable of...

supporting hierarchical quotas currently, and Melange has no interest in
Quotas, we've implemented a hack that allows Nova to pass down the
default quota flag to interface/ip allocation. If allocating IPs on
private networks for a tenant, Melange will enforce the limit and raise,
emulating a quota.

This patch has a known race condition; since melange was written in a
way that completely hides sqlalchemy, there is no trivial way to enforce
transactions, meaning that there's a small window in which Melange can
check the IP address count, determine that it's valid, then attempt to
allocate them, effectively running over the established quotas. However,
as this is more of a preview than long-term solution, we deem this
acceptable at this time.