FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Make vpc.max.networks dynamic and return a useful error at the limit by MitchDrage · Pull Request #14373 · apache/cloudstack · GitHub

Repository navigation

Make vpc.max.networks dynamic and return a useful error at the limit - #14373

Open
MitchDrage wants to merge 2 commits into
apache:mainfrom
MitchDrage:vpc-tier-limits
Open

MitchDrage wants to merge 2 commits into
apache:mainfrom
MitchDrage:vpc-tier-limits

Conversation

MitchDrage commented Oct 9, 2026 •
edited
Loading

Copy link
Copy Markdown
Contributor

Description

  • 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)
  • 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
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Screenshots (if appropriate):

N/A

How Has This Been Tested?

  • Unit tests: a new test checks the limit is read from the current setting value.
  • 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.

How did you try to break this feature and the system with this change?

  • Tested an upgrade from an existing install: a custom value of 4 was kept.
  • Tried to change the setting as a domain admin. It's refused.
  • Ran the full server module test suite. All tests pass.

MitchDrage changed the title Allow per-Domain/Account VPC tier limits Make vpc.max.networks dynamic and return a useful error at the limit Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

I've changed direction on this PR. Per-account/domain values aren't needed: the cap exists to handle the technical limitation of the VR's NIC capacity which is the same for every tenant, and VPC tiers already count toward the account and domain guest network limits.
I've removed the per-account/domain values, and this PR now makes the global setting dynamic, with the clearer error. I've updated the title and description to match.

Damans227 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

thanks @MitchDrage, keeping it global looks right. LGTM

codecov Bot commented Oct 21, 2026 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 20.72%. Comparing base (f03cffc) to head (9ea440f).
⚠️ Report is 113 commits behind head on main.

Files with missing lines Patch % Lines
...ain/java/com/cloud/network/vpc/VpcManagerImpl.java 33.33% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #14373      +/-   ##
============================================
+ Coverage     20.21%   20.72%   +0.50%     
- Complexity    20747    20765      +18     
============================================
  Files          6426     6049     -377     
  Lines        580181   547750   -32431     
  Branches      71033    73171    +2138     
============================================
- Hits         117282   113517    -3765     
+ Misses       450184   420927   -29257     
- Partials      12715    13306     +591     
Flag Coverage Δ
uitests 3.86% <ø> (+0.17%) ⬆️
unittests 22.15% <42.85%> (+0.64%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@blueorangutan package

Copy link
Copy Markdown

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19646

Copy link
Copy Markdown
Contributor

@blueorangutan test

nvazquez added this to the 24.0 milestone Oct 29, 2026

Copy link
Copy Markdown

@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

Copy link
Copy Markdown

[SF] Trillian test result (tid-17319)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 56848 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr14373-t17319-kvm-ol8.zip
Smoke tests completed. 157 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

clgtm

bernardodemarco left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

code lgtm

Drop account name from the max VPCs error

Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>
RosiKyu self-assigned this Nov 12, 2026

RosiKyu commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

@blueorangutan package

Copy link
Copy Markdown

@RosiKyu a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 20037

RosiKyu commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

@blueorangutan test

Copy link
Copy Markdown

@RosiKyu a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Make vpc.max.networks dynamic and improve the limit-reached error

7 participants


Back | FazBrowse Home | New Git URL