jmsperu opened a new issue, #14969: URL: https://github.com/apache/cloudstack/issues/14969
## ISSUE TYPE Improvement Request ## COMPONENT NAME 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: 1. `Domain Id = 11` is the internal database id. Users should see the domain name (or path). 2. `tag = 'null'` is printed when the limit has no tag. 3. Internal type names (`user_vm`, `primary_storage`) are shown instead of words. 4. Reservation and current amounts are useful to admins, but they are noise for end users. 5. 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. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
