Jump to: navigation, search


Revision as of 19:27, 1 May 2012 by Everett (talk) (Updates after Summit session)
  • Launchpad Entry: SwiftSpec:storage-quotas
  • Created: 1 Mar 2012
  • Contributors: Everett Toews


In some deployment scenarios, such as a private cloud, the provider may want to limit the tenants (accounts) to a maximum allowable amount of storage via a quota.

Release Note

A storage quota prevents accounts from using more than their allowed storage.

A storage quota of -1 indicates unlimited storage for an account (-1 also indicates unlimited in Nova quotas).


This is necessary for providers that cannot simply add disk at will as storage usage grows. There are any number of factors that may prevent a provider from being able to easily add disk.


The quota values are stored per account. All values are in bytes.

User stories

User stories Account: <quota>

Account Unlimited Storage Account: -1 When the quota has a -1 value, storage is unlimited.

Account Blacklist Account: 0 When the account has a 0 value, storage is not allowed.

Account Limited Storage Account: >1 When the account has a >1 value, storage is limited to that value.

Account goes over-quota Error code returned from middleware and the client is responsible for the actual notification (email/sms/whatever)

If an account goes over-quota, it will go into an Over-Quota Mode. Below are just examples, the middleware should be generic enough to be easily tweakable (pluggable?) to add different modes. The only mode to be implemented as part of this spec is the Read/Delete-only mode.

Over-Quota Mode:

  • Read/Delete-only mode
  • Auto-increase quota
  • All stop
  • Specific rate-limiting (degraded service for an over quota account)

Account goes under-quota Business as usual




  1. get auth token
  2. get usage
  3. get quota
  4. filter in Swift middleware

Quotas could live outside of Swift and be part of Auth as they are account (tenant) level info.

Where does the usage data come from?

  • HEAD on the account (RFE: number of bytes transferred since XXX) HEADs are cheap and caching will keep this performant, returns billable bytes, not raw bytes
  • slogging (for rolled-up storage and bandwidth )

UI Changes

The Swift CLI will need to be able to CRUD quotas for accounts. You should be able to view quota usage in Horizon.

Code Changes

Code changes should include an overview of what needs to change, and in some cases even the specific details.



  • data migration, if any
  • redirects from old URLs to new ones, if any
  • how users will be pointed to the new way of doing things, if necessary.

Test/Demo Plan

This need not be added or completed until the specification is nearing beta.

Unresolved issues

This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.

BoF agenda and discussion

Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.