Skip to main content
Version: v25.1.6

Tenant object storage quota management

Setting and inspecting object storage user quotas for IaaS Console tenants

Setting quota​

Object storage quotas are managed through the /api/tenants/{tenant_id}/quota API endpoint.

Requires: operator-scoped token

TENANT_ID=<tenant_id>
QUOTA_GB=100 # use -1 for unlimited

curl -s -X PUT \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "{\"objectStorageGigabytes\": $QUOTA_GB}" \
https://<iaas-api>/api/tenants/$TENANT_ID/quota

All fields are optional: omitted fields are left unchanged. At least one field must be provided.

FieldUnitDescription
objectStorageGigabytesGB(Optional) RGW user quota
blockStorageGigabytesGB(Optional) Cinder volume quota
instancescount(Optional) Nova VM instances
vcpuscount(Optional) vCPUs
ramMB(Optional) RAM

Use -1 for any field to set it to unlimited.

note

Quota setting and enforcement is asynchronous:

  • After applying a quota via the API, it may take several minutes before RGW reflects the change and begins enforcing it
  • Tenants may slightly exceed their quota before being limited

Verifying the quota​

As a member of the tenant, query the iaas-api usage endpoint:

Requires: tenant-scoped token

curl -s -H "Authorization: Bearer $TOKEN" \
https://<iaas-api>/api/storage/usage \
| jq '{usedBytes: .objectStorageUsedBytes, quotaBytes: .objectStorageQuotaBytes}'

Annex: Checking the object storage quota in Rados Gateway (RGW)​

The IaaS Console tenant ID is used as the OpenStack project name. The OpenStack project ID (a different UUID) is what RGW uses as the UID base.

IaaS Console tenant IDOpenStack project nameOpenStack project IDRGW user UID
Value<tenant_id><tenant_id><project_id><project_id>$<project_id>
Obtain viaGET /api/tenantssame as tenant ID, openstack project listopenstack project listradosgw-admin user list
Run onvia the Console REST APIOpenStack CLI on deployment bastionOpenStack CLI on deployment bastionany storage node

RGW exposes the project name as display_name on the implicit user. To find which RGW user corresponds to a given tenant ID, scan all users for a matching display_name. Run the following commands on any storage node:

radosgw-admin user list | jq -r '.[]' | while read -r uid; do
display=$(radosgw-admin user info --uid "$uid" 2>/dev/null | jq -r .display_name)
echo "$uid -> $display"
done

The entry whose display_name matches your tenant ID is the correct RGW user. To confirm the quota is applied, check the user_quota field:

radosgw-admin user info --uid '<project_id>$<project_id>' | jq .user_quota

Expected output when a 40 TiB quota is set:

{
"enabled": true,
"check_on_raw": false,
"max_size": 43980465111040,
"max_size_kb": 42949672960,
"max_objects": -1
}

enabled: true confirms the quota is active. max_objects: -1 means no object count limit.