NSX: add native route-based Site-to-Site VPN support - #13766
Draft
Dogface2k wants to merge 1 commit into
Draft
Conversation
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR implements native, route-based Site-to-Site VPN for NSX NAT-mode VPCs. The VPN terminates on the VPC's NSX Tier-1 gateway; the CloudStack virtual router remains outside the IPsec data path.
The implementation makes the existing built-in
Vpn/Nsxservice mapping functional and supersedes the capability-removal approach in the closed #13765. It does not change seeded offerings or the database schema.The main lifecycle is provider-dispatched through
Site2SiteVpnServiceProviderinstead of adding another provider-specific branch toSite2SiteVpnManagerImpl:IPSecVpnServiceand local endpoint;RouteBasedIPSecVpnSession, and a VTI nameddefault-tunnel-interface;NO_SNATrule so traffic is not rewritten by the VPC's catch-all source NAT before entering the tunnel;The public endpoint is intentionally separate from the VPC source-NAT address. NSX requires the IPsec local endpoint to differ from the Tier-1 uplink address. Auto-acquired endpoint addresses are released on gateway deletion; operator-supplied addresses are detached but not released.
Compatibility and failure handling are explicit:
The Tier-0 must redistribute
TIER1_IPSEC_LOCAL_ENDPOINTroutes for the dedicated gateway address to be externally reachable.Related context: #13764 and the superseded closed PR #13765.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
Not applicable.
How Has This Been Tested?
The exact upstream-clean commit was built and tested from current
mainat4f117071c9397b1e4714c8fb61c384883c872842with Java 17:The changed
api,server, and NSX plugin modules also passed:The NSX suite covers all six management-server/agent command paths, including a real CloudStack
Request/Gson round trip proving that the PSK remains on the wire while@LogLevel(Off)excludes it from log serialization.An earlier 4.22.1 backport/prototype was exercised against NSX 4.2.4. Live validation exposed five integration defects that are addressed in this branch: virtual-router command leakage, the virtual-router monitor overwriting NSX state, NSX marked-for-deletion races, idle tunnels being removed by periodic DPD, and catch-all SNAT rewriting VPN traffic.
The PR is intentionally draft until this exact upstream-clean commit is rerun through the complete live lifecycle: gateway creation, tunnel establishment and bidirectional traffic, stop/start/reset, connection deletion, gateway deletion, VPC teardown, and the Tier-0 endpoint-route redistribution prerequisite.
How did you try to break this feature and the system with this change?
The negative and compatibility coverage exercises the failure boundaries rather than only the happy path:
NO_SNATrules during deletion;UP,DOWN, degraded, and not-found results map to the intended CloudStack states;No generic CloudStack command proxy, broad exception suppression, schema migration, retry of an ambiguous CloudStack mutation, or unrelated UI/CKS/network-offering change is included.