Skip to content

Revert "Network: default egress policy Allow for Isolated networks on fresh installations" - #14116

Merged
DaanHoogland merged 1 commit into
mainfrom
revert-13684-isolated-network-egress-default-allow
Sep 10, 2026
Merged

DaanHoogland merged 1 commit into
mainfrom
revert-13684-isolated-network-egress-default-allow

Conversation

@DaanHoogland

Copy link
Copy Markdown
Contributor

Reverts #13684

@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 19.79%. Comparing base (e0f3006) to head (54a9e00).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #14116      +/-   ##
============================================
- Coverage     19.83%   19.79%   -0.04%     
+ Complexity    20026    20021       -5     
============================================
  Files          6371     6371              
  Lines        575986   575981       -5     
  Branches      70526    70526              
============================================
- Hits         114235   114035     -200     
- Misses       449326   449510     +184     
- Partials      12425    12436      +11     
Flag Coverage Δ
uitests 3.52% <ø> (ø)
unittests 21.07% <ø> (-0.04%) ⬇️

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.

@DaanHoogland
DaanHoogland merged commit 8afd114 into main Sep 10, 2026
9 of 10 checks passed
@DaanHoogland
DaanHoogland deleted the revert-13684-isolated-network-egress-default-allow branch September 10, 2026 10:02

Copilot AI 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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Pull request overview

Reverts the prior change that defaulted isolated network offerings to egress “Allow”, restoring “Deny” defaults and removing the associated server-side seeding behavior and tests.

Changes:

  • Updates UI defaults for egressdefaultpolicy from allow to deny when creating a network offering.
  • Removes server-side seeding of egressDefaultPolicy=true for built-in isolated offerings on first boot.
  • Deletes/adjusts related Java tests and removes NetworkOfferingVO#setEgressDefaultPolicy.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
ui/src/views/offering/AddNetworkOffering.vue Restores default egress policy to deny in the UI’s offering template.
server/src/main/java/com/cloud/server/ConfigurationServerImpl.java Stops explicitly seeding isolated default offerings with egress Allow.
server/src/test/java/com/cloud/server/ConfigurationServerImplTest.java Removes the test that asserted seeded isolated offerings default to egress Allow.
engine/schema/src/main/java/com/cloud/offerings/NetworkOfferingVO.java Removes the setter for egressdefaultpolicy.
api/src/test/java/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmdTest.java Deletes tests asserting API default behavior for egressdefaultpolicy.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@@ -346,10 +346,6 @@ public boolean isEgressDefaultPolicy() {
return egressdefaultpolicy;
}

Comment on lines 1069 to 1071
defaultIsolatedSourceNatEnabledNetworkOffering.setState(NetworkOffering.State.Enabled);
// Default egress policy is Allow on fresh installations, consistent with the
// createNetworkOffering API default (egressdefaultpolicy=true when not specified).
// Existing installations are not affected: this method only runs on first boot
// (guarded by the "init" configuration flag) and persistDefaultNetworkOffering()
// never updates an already existing offering.
defaultIsolatedSourceNatEnabledNetworkOffering.setEgressDefaultPolicy(true);
defaultIsolatedSourceNatEnabledNetworkOffering.setSupportsVmAutoScaling(true);
defaultIsolatedSourceNatEnabledNetworkOffering = _networkOfferingDao.persistDefaultNetworkOffering(defaultIsolatedSourceNatEnabledNetworkOffering);
conservemode: true,
availability: 'optional',
egressdefaultpolicy: 'allow',
egressdefaultpolicy: 'deny',
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 24.69%
Branch coverage 18.90%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

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.

4 participants