Jump to: navigation, search

KeystoneStoreQuotaData

Revision as of 20:10, 9 May 2012 by Everett (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
  • Launchpad Entry: KeystoneSpec:store-quota-data
  • Created: 9 May 2012
  • Contributors: Everett Toews

Summary

In order to enable the use of quotas across different OpenStack components we need to store them centrally. Keystone can be used as that central datastore.

Release Note

Quota information for a tenant can be stored and accessed in Keystone.

Rationale

Quotas are necessary to prevent overconsumption of resources.

User stories

1. An administrator wants to manipulate the Swift quotas for a single resource, the total storage (in bytes since that's the level of granularity in Swift) allowed, for a tenant/account in Swift. The administrator accesses the quota information via some Admin only subcommands in the keystone client.

The general form of the command is:

  • keystone quota-<action> <quota> <tenant-id>

where <quota> and <tenant-id> are always required


keystone quota-create swift.total=1073741824 <tenant-id>
keystone quota-get swift.total <tenant-id>
keystone quota-list <tenant-id>
keystone quota-update swift.total=2147483648 <tenant-id>
keystone quota-delete swift.total <tenant-id>


2. An administrator wants to manipulate the Nova quotas for multiple resources like ram and instances for a tenant in Nova and the Swift quotas for the total storage. The administrator accesses the quota information via some Admin only subcommands in the keystone client.


keystone quota-create {"swift":{"total":1073741824},"nova":{"ram":102400,"instances":20}} <tenant-id>
keystone quota-update {"swift":{"total":2147483648},"nova":{"ram":102400,"instances":20}} <tenant-id>
keystone quota-delete {"swift":["total"],"nova":["ram","instances"]} <tenant-id>


Design

TBD

Implementation

  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.

Migration

Include:

  • 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.