Skip to content

network: fix VXLAN private gateway creation - #14144

Open
xujiantop-crypto wants to merge 1 commit into
apache:4.22from
xujiantop-crypto:fix/vpc-private-gateway-vxlan
Open

network: fix VXLAN private gateway creation#14144
xujiantop-crypto wants to merge 1 commit into
apache:4.22from
xujiantop-crypto:fix/vpc-private-gateway-vxlan

Conversation

@xujiantop-crypto

Copy link
Copy Markdown

Description

Fixes #14143.

Creating a VPC private gateway with an explicit vxlan://1005002 broadcast URI fails with unsupported type of broadcastUri specified, because NetworkServiceImpl.createPrivateNetwork only 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

  • 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

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

How Has This Been Tested?

  • Before the fix, 7 tests ran: the new API test failed with InvalidParameterValueException: unsupported type of broadcastUri specified: vxlan://1005002, and the VXLAN design case failed with expected:<Vxlan> but was:<Vlan>. The other 5 cases passed.
  • After the fix, all 7 tests in CreatePrivateNetworkTest and PrivateNetworkGuruTest pass, with no failures, errors or skipped tests.
  • All 25 selected Maven reactor modules succeed on JDK 11, with 0 Checkstyle violations. git diff --check also passes.

This PR targets 4.22 following 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.txt before 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 test

How 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.

Signed-off-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
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.

1 participant