network: fix VXLAN private gateway creation - #14144
Open
xujiantop-crypto wants to merge 1 commit into
Open
Conversation
Signed-off-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
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
Fixes #14143.
Creating a VPC private gateway with an explicit
vxlan://1005002broadcast URI fails withunsupported type of broadcastUri specified, becauseNetworkServiceImpl.createPrivateNetworkonly accepts VLAN and logical-switch URIs.Allow VXLAN URIs through the existing private-network creation flow. Also correct the broadcast domain type in
PrivateNetworkGuru.design: the input from network orchestration may carry a VXLAN URI but a VLAN type, which would otherwise be persisted unchanged. The correction is limited to VXLAN so native/untagged, VLAN and logical-switch networks retain their existing type.The private-gateway NIC helper already carries the full URI and derives its broadcast type from the scheme. The KVM bridge driver already handles VXLAN. No schema or router-script change is required for these two defects.
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
How Has This Been Tested?
InvalidParameterValueException: unsupported type of broadcastUri specified: vxlan://1005002, and the VXLAN design case failed withexpected:<Vxlan> but was:<Vlan>. The other 5 cases passed.CreatePrivateNetworkTestandPrivateNetworkGuruTestpass, with no failures, errors or skipped tests.git diff --checkalso passes.This PR targets
4.22following the contribution guide's release-branch policy for bug fixes.The official system-VM checksum file was downloaded to
engine/schema/dist/systemvm-templates/sha512sum.txtbefore running Maven. The local Maven download plugin cannot retrieve that URL, so only its redundant download is skipped; no build-configuration changes are included.mvn -B -pl server -am -Dtest=CreatePrivateNetworkTest,PrivateNetworkGuruTest -Dsurefire.failIfNoSpecifiedTests=false -Ddownload.plugin.skip=true testHow did you try to break this feature and the system with this change?
The API regression exercises a VNI above the VLAN tag range and checks that the full VXLAN URI reaches network orchestration. Existing tests retain rejection of unknown and unsupported URI schemes. The guru tests check VXLAN correction, tagged VLAN, native/untagged, logical-switch and absent-URI cases, including the resulting network state, CIDR and gateway.
The full KVM/VPC scenario has not been run locally. For environment validation, create a private gateway using an explicit VXLAN URI on a VXLAN physical network with a suitable non-overlapping VNI; confirm creation succeeds, the network's broadcast URI/type agree, and the router NIC attaches to the corresponding VXLAN bridge.