Difference between revisions of "DomainQuotaDriver"
(→Implementation) |
(→Desing) |
||
Line 55: | Line 55: | ||
= Desing = | = Desing = | ||
− | + | To use the two driver design and parallel domain, the drivers will be called via the Quota Engine, so if both drivers are enabled for each function as committed or reserved, for example, will be made for the two drivers. | |
[[File:QuotaEngine.png|600x269px]] | [[File:QuotaEngine.png|600x269px]] |
Revision as of 13:32, 2 December 2013
Introduction
Nova BP Domain Quota Driver will enable O~S projects to enforce domain quotas in Nova, for this a new driver capable to enforce domain quota is necessary. This BP addresses the need of a new quota driver capable to enforce domain quotas in Nova.
Quotas in Nova
Currently, OpenStack services make usage of quotas to limit the project resources. For example, the “Instances” quota represents the number of instances that can be created in a project. The table below summarizes the existing project quotas. From now on there will be the same options as Quotas in the context of domain.
quotas | type | default values | description |
---|---|---|---|
instances | reservable | 10 | number of instances allowed per project |
cores | reservable | 20 | number of instance cores allowed per project |
ram | reservable | 50*1024 | megabytes of instance ram allowed per project |
floating_ips | reservable | 10 | number of floating ips allowed per project |
fixed_ips | reservable | -1 | number of fixed ips allowed per project |
metadata_items | absolute | 128 | number of metadata items allowed per instance |
injected_files | absolute | 5 | number of injected files allowed |
injected_files_content_bytes | absolute | 10*1024 | number of bytes allowed per injected file |
nova.injected_file_path_bytes | absolute | 255 | number of bytes allowed per injected file path |
nova.security_groups | reservable | 10 | number of security groups per project |
nova.security_groups_rules | countable | 20 | number of security rules per security group |
nova.key_pairs | countable | 100 | number of key pairs per user |
User Stories
The idea for the insertion of this new driver is that it runs parallel to the project driver. Therefore, you can enable and disable the driver in the Nova configuration file. The other features are similar to the domain project driver.
Following is the list of the USs in Domain Quota Driver:
- As a system administrator, I want to choose which quota driver to use
- As a system administrator, I want absolute quotas to be enforced
- As a system administrator, I want countable quotas to be enforced
- As a system administrator, I want reservable quotas to be reserved
- As a system administrator, I want reservable quotas to be commited
- As a system administrator, I want reservable quotas to be rolled back
- As a system administrator, I want reservable quotas to expire
- As a user, I want to free quotas when resources are deleted.
Desing
To use the two driver design and parallel domain, the drivers will be called via the Quota Engine, so if both drivers are enabled for each function as committed or reserved, for example, will be made for the two drivers.
Implementation
To implement the Domain Quota Driver was necessary to create 3 tables: DomainQuota, DomainQuotaUsages and DomainReservation, so we can store information about the limits of quotas, than is already in used and also the reserves of resources.
Domain Quota Table
Column | Description |
---|---|
id | primary key. |
resource | resource name. |
domain_id | id that reference the domain. |
hard_limit | limit to quota. |
created_at | time at which the record is created. |
updated_at | time at which the record is updated. |
deleted_at | time at which the record is deleted. |
deleted | if the record was deleted |
Domain Quota Usages Table
Column | Description |
---|---|
id | primary key. |
resource | resource name. |
domain_id | id that reference the domain. |
in use | amount of the resource that is already in use. |
reserved | is this resource is reserved. |
created_at | time at which the record is created. |
updated_at | time at which the record is updated. |
deleted_at | time at which the record is deleted. |
until_refresh | count of reservations until usage is refreshed |
deleted | if the record was deleted |
Domain Reservation Table
Column | Description |
---|---|
id | primary key. |
resource | resource name. |
domain_id | id that reference the domain. |
usage_id | id that reference the usage quota. |
in use | amount of the resource that is already in use. |
reserved | is this resource is reserved. |
created_at | time at which the record is created. |
updated_at | time at which the record is updated. |
deleted_at | time at which the record is deleted. |
uuid | Universally unique identifier. |
delta | variation of the resource to be added. |
expire | If the reservation is already expired. |
deleted | if the record was deleted |