kvm: Add a configuration setting to switch between multicast and evpn VXLAN modes#13107
kvm: Add a configuration setting to switch between multicast and evpn VXLAN modes#13107wido wants to merge 2 commits intoapache:mainfrom
Conversation
… VXLAN modes Using the 'network.vxlan.mode' setting you can switch between the multicast (default) and evpn VXLAN modes on a KVM Agent. When nothing is configured CloudStack will default to multicast by using the modifyvxlan.sh script in the background. If this setting is set to 'evpn' the KVM Agent will execute the 'modifyvxlan-evpn.sh' script which will configure the VXLAN devices for EVPN (usually with FRRouting with BGP) mode. This removes the need to manually replace a shell script on the hypervisor to switch modes. Existing environments are not touched by this and it is safe to add this setting a an environment already using EVPN for the VXLAN deployment.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13107 +/- ##
============================================
- Coverage 18.08% 18.08% -0.01%
+ Complexity 16706 16704 -2
============================================
Files 6037 6037
Lines 542437 542440 +3
Branches 66420 66421 +1
============================================
- Hits 98088 98082 -6
- Misses 433333 433342 +9
Partials 11016 11016
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@bernardodemarco a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17722 |
There was a problem hiding this comment.
Pull request overview
This PR adds a KVM agent configuration property (network.vxlan.mode) to select which VXLAN setup script the KVM BridgeVifDriver uses, enabling switching between the default multicast-based VXLAN setup and an EVPN-based setup without manually replacing scripts on the hypervisor.
Changes:
- Introduces a new agent property
network.vxlan.mode(default:multicast) to control VXLAN mode selection. - Updates
BridgeVifDriverto choosemodifyvxlan.sh(multicast) vsmodifyvxlan-evpn.sh(EVPN) based on the new property. - Improves the thrown configuration error message to reference the selected script name.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java | Selects the VXLAN configuration script based on network.vxlan.mode. |
| agent/src/main/java/com/cloud/agent/properties/AgentProperties.java | Adds the network.vxlan.mode agent property definition and documentation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| _modifyVxlanPath = Script.findScript(networkScriptsDir, "modifyvxlan.sh"); | ||
| String vxlanMode = AgentPropertiesFileHandler.getPropertyValue(AgentProperties.NETWORK_VXLAN_MODE); | ||
| String vxlanScript = "evpn".equalsIgnoreCase(vxlanMode) ? "modifyvxlan-evpn.sh" : "modifyvxlan.sh"; |
Make sure there is an example in the agent.properties file so people can easily discover this configuration setting exists
Description
Using the 'network.vxlan.mode' setting you can switch between the multicast (default) and evpn VXLAN modes on a KVM Agent.
When nothing is configured CloudStack will default to multicast by using the modifyvxlan.sh script in the background. If this setting is set to 'evpn' the KVM Agent will execute the 'modifyvxlan-evpn.sh' script which will configure the VXLAN devices for EVPN (usually with FRRouting with BGP) mode.
This removes the need to manually replace a shell script on the hypervisor to switch modes.
Existing environments are not touched by this and it is safe to add this setting a an environment already using EVPN for the VXLAN deployment.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale