Include the URL of your launchpad blueprint:
https://blueprints.launchpad.net/cinder/+spec/support-volume-backup-quota
Provide a mean to control volume backup’s quota.
Since quota take volumes, snapshots and gigabytes into account, it also needs to take backup into account:
By supporting volume backup quota, we need to do the following changes.
Add the default quota of backup number quota item and backup gigabytes quota item.
Cinder quota update API support backup number quota and backup gigabytes quota create and update operation.
Cinder quota show/defaults API support displaying backup quota info.
Quota Engine support processing with backup quota item.
Class QuotaEngine and Class VolumeTypeQuotaEngine support processing with backup quota item. Add _sync_backups function to get one project's backup number. Add _sync_backup_gigabytes function to get one project's backup gigabytes number. Add configuration item no_backup_gb_quota, which indicates whether to take backup's size into account with backup gigabytes quota. Add '_sync_backup': _sync_backups to QUOTA_SYNC_FUNCTIONS. Add '_sync_backup_gigabytes': _sync_backup_gigabytes to QUOTA_SYNC_FUNCTIONS.
Backup create/delete routine support dealing with backup number quota and backup gigabytes quota.
Limits API support displaying one project’s current used number and maximum number of backup number and backup gigabytes info.
None
None
Change the following APIs’ return value.
Cinder quota show/defaults API
Current return value:
{
"quota_set":
{
"gigabytes": 1000,
"snapshots": 10,
"volumes_rbd": -1,
"volumes": 10,
"gigabytes_rbd": -1,
"snapshots_rbd": -1,
"id": "bb2ec78e61d3493da61449f3c69db3f3"
}
}
New return value:
{
"quota_set": {
"gigabytes": 1000,
"snapshots": 10,
"volumes_rbd": -1,
"volumes": 10,
"snapshots_rbd": -1,
"gigabytes_rbd": -1,
"backups": 10, # new add return item
"backup_gigabytes": 1000, # new add return item
"id": "bb2ec78e61d3493da61449f3c69db3f3"
}
}
Limit index API return value
Current return value:
{
"limits": {
"rate": [],
"absolute": {
"totalSnapshotsUsed": 0,
"maxTotalVolumeGigabytes": 1000,
"totalGigabytesUsed": 5,
"maxTotalSnapshots": 10,
"totalVolumesUsed": 5, #new add return item
"maxTotalVolumes": 10 # new add return item
}
}
}
New return value:
{
"limits": {
"rate": [],
"absolute": {
"totalSnapshotsUsed": 0,
"maxTotalVolumeGigabytes": 1000,
"totalGigabytesUsed": 5,
"maxTotalSnapshots": 10,
"totalVolumesUsed": 5,
"maxTotalVolumes": 10,
"totalBackupsUsed": 0, # new add return item
"maxBackupsUsed": 10, # new add return item
"totalBackupGigabytesUsed": 0, # new add return item
"maxTotalBackupGigabytes": 1000, # new add return item
}
}
}
DoS via resource exhaustion of backup resources is prevented.
None.
The return values of Cinder quota show/defaults API and limits API have changed.
None
None
None
None
Both unit and Tempest tests need to be created to cover the code change that mentioned in “Proposed change” and ensure that Cinder Quota feature works well while adding support for volume backup.
The cinder API documentation will need to be updated to reflect the REST API changes.
None
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.