Network: default egress policy Allow for Isolated networks on fresh installations (reopen of #13684) - #14300
Conversation
…nstallations Reapplies the change merged as e0f3006 (apache#13684) and reverted by apache#14116. The discussion on changing this default is still ongoing, so the change is restored here unchanged for continued review rather than remaining on main. Seeds the two built-in Isolated network offerings (DefaultIsolatedNetworkOfferingWithSourceNatService and DefaultIsolatedNetworkOffering) with egress default policy Allow on fresh installations only; existing offerings and networks are untouched and no upgrade SQL runs. Also flips the AddNetworkOffering UI default from deny to allow so the UI no longer sends an explicit deny that overrides the createNetworkOffering API default.
|
This reopens #13684, which was merged as The default egress policy change is still under discussion on the dev@ mailing list, so this should not be merged until that thread reaches consensus — it shouldn't land on cc @DaanHoogland for visibility. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14300 +/- ##
============================================
+ Coverage 19.91% 19.95% +0.03%
- Complexity 20199 20211 +12
============================================
Files 6373 6373
Lines 577230 577235 +5
Branches 70696 70696
============================================
+ Hits 114950 115177 +227
+ Misses 449713 449497 -216
+ Partials 12567 12561 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thanks @DaanHoogland — ironically 😉 — for both merging and reverting this one, all without a heads-up. Jokes aside, no harm done and thanks for the quick revert. Maybe let's keep the merge button holstered until we're back from the beach next time 😄 On a serious note: I've reopened the identical change as #14300. It should stay parked until the dev@ [DISCUSS] thread concludes — please don't merge ahead of that. |
|
For reference, the dev@ discussion thread is here: Let's keep this PR parked until that thread reaches consensus. |
| conservemode: true, | ||
| availability: 'optional', | ||
| egressdefaultpolicy: 'deny', | ||
| egressdefaultpolicy: 'allow', |
There was a problem hiding this comment.
this ui default also changes things for existing clouds, since admins making a new offering there now get allow unless they switch it. is that ok given the description says existing setups are untouched?
Description
This reopens #13684, which was merged as commit
e0f3006764d00f18a59945861b50bf55d01f64eband then reverted by #14116. The dev@ discussion on whether to change this default is still ongoing, so the change should not have landed onmainyet. This PR restores the identical change for continued review (it is a revert of the revert — the diff is byte-for-byte the same as the merged #13684).Reference:
e0f3006764)8afd1148a2)Background
Isolated guest networks created from the built-in default network offerings (
DefaultIsolatedNetworkOfferingWithSourceNatServiceandDefaultIsolatedNetworkOffering) deny all egress by default, because they are seeded with aNetworkOfferingVOconstructor that leavesegressdefaultpolicyat the Java primitive default (false= deny). MeanwhilecreateNetworkOfferingwithout an explicitegressdefaultpolicyalready defaults to allow, and VPC tiers (NetworkACL) allow egress out of the box. So the shipped defaults are inconsistent, and the default "simple Isolated network" is the surprising one — freshly deployed VMs cannot reach package mirrors, NTP, metadata, etc. until an allow-all egress rule is added.Changes
ConfigurationServerImplseeds the two built-in Isolated network offerings with egress default policy Allow, on fresh installations only.AddNetworkOffering.vuedefault flipped fromdenytoallow, so the UI no longer sends an explicitdenythat overrides thecreateNetworkOfferingAPI default.NetworkOfferingVO.setEgressDefaultPolicysetter.ConfigurationServerImplTest(seeding) andCreateNetworkOfferingCmdTest(API default).Backward compatibility
persistDefaultNetworkOfferingnever updates existing rows. No data migration / upgrade SQL runs against existingnetwork_offeringsor networks.egressdefaultpolicyparameter and per-offering behaviour are unchanged.egress_default_policyDB column default is intentionally not changed.The one consideration is security posture on new clouds, which is exactly why there is an open dev@ discussion; this PR exists to keep the change reviewable while that concludes.
Types of changes
How Has This Been Tested?
Change is identical to the previously merged #13684.
ConfigurationServerImplTestandCreateNetworkOfferingCmdTestcover the seeded default and the API default respectively.