You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Resource limit errors show internal ids and "tag = 'null'", and use three different texts and two error codes #14969
ResourceLimitManagerImpl, IpAddressManagerImpl, API error text
CLOUDSTACK VERSION
4.22.1.1
SUMMARY
We hit every account limit type plus a domain limit as a normal user on 4.22.1.1. The texts end users see:
Account limit (errorcode 535), for user_vm, cpu, memory, volume, primary_storage, network, vpc, snapshot and template:
Maximum amount of resources of Type = 'user_vm', tag = 'null' for Account Name = fe2-acct in Domain Id = 11 is exceeded: Account Resource Limit = 0, Current Account Resource Amount = 1, Current Account Resource Reservation = 0, Requested Resource Amount = 1.
Domain limit (errorcode 535):
Maximum domain resource limits of Type 'user_vm' for Domain Id = e3f4b915-... is exceeded: Domain Resource Limit = 1, Current Domain Resource Amount = 2, Current Resource Reservation = 0, Requested Resource Amount = 1.
Public IP limit (errorcode 532):
Maximum number of public IP addresses for account: fe2-acct has been exceeded.
Problems:
Domain Id = 11 is the internal database id. Users should see the domain name (or path).
tag = 'null' is printed when the limit has no tag.
Internal type names (user_vm, primary_storage) are shown instead of words.
Reservation and current amounts are useful to admins, but they are noise for end users.
Three sentence shapes for the same condition, and the public IP case uses 532 where every other limit uses 535. Clients that match on code or text have to special-case it.
STEPS TO REPRODUCE
1. updateResourceLimit for a test account, resourcetype 0 (user_vm), max 0.
2. deployVirtualMachine as that account.
3. Repeat for other types, for a domain limit, and for public IPs (resourcetype 1, then associateIpAddress).
EXPECTED RESULTS
One text shape for all limit types and owners, for example "The account limit for instances is reached (limit 1, in use 1)." with the owner name, not an id, and no "tag = 'null'". The same error code (535) for public IPs. The structured details (type, owner type, owner name, limit, current, requested, reserved) in error metadata, which PR #12336 already adds for ResourceAllocationException.
ACTUAL RESULTS
As above.
NOTES
PR #12336 (handleCreateResourceAllocationException, errormetadata) is the right base. This list is meant to help that follow-up cover the domain form and the public IP path too. Closed #14372 improved only the VPC tier limit text.
Activity