MitchDrage opened a new pull request, #14373:
URL: https://github.com/apache/cloudstack/pull/14373

   ### Description
   
   - `vpc.max.networks` can now be set per account and per domain, falling back 
to the global value.
   - Changed `vpc.max.networks` to be dynamic, so changes no longer need a 
restart.
   - Hitting the limit now returns a 431 with a readable message, where it used 
to return a 530 "Internal error executing command".
   - The key name is unchanged, so existing values carry over without a DB 
migration.
   
   **Messages:**
   Original (HTTP 530):
   - Non-admin users: `Internal error executing command, please contact your 
system administrator`
   - Root admins: `Number of networks per VPC cannot surpass [3].`
   
   New (HTTP 431, all users):
   `VPC web-prod has reached the maximum of 3 networks. Delete an unused 
network or contact your platform administrator to raise the limit.`
   
   Closes #14372
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [x] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [ ] Build/CI
   - [x] Test (unit or integration test code)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [x] Minor
   
   ### Screenshots (if appropriate):
   N/A
   
   ### How Has This Been Tested?
   
   - **Unit tests**: three new tests cover an account value above the global 
value, an account value below it, and the domain value applying when the 
account has none.
   - **Simulator**: advanced zone, with tenant calls made as non-admin users:
     - The global limit rejects the extra tier with a 431 and the message above.
     - Changing the global value applies straight away.
     - `resetConfiguration` on an account falls back to the domain value.
     - The key appears in `listConfigurations` for both an account and a 
domain, which the account and domain Settings tabs use.
   
   #### How did you try to break this feature and the system with this change?
   
   - Ran the new unit tests against the original code to confirm they fail 
there.
   - Tested an upgrade from an existing install: a custom value of 4 was kept.
   - Ran the full `server` module test suite. All tests pass.
   


-- 
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]

Reply via email to