Copilot commented on code in PR #13107:
URL: https://github.com/apache/cloudstack/pull/13107#discussion_r3193113672
##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java:
##########
@@ -76,9 +76,11 @@ public void configure(Map<String, Object> params) throws
ConfigurationException
if (_modifyVlanPath == null) {
throw new ConfigurationException("Unable to find modifyvlan.sh");
}
- _modifyVxlanPath = Script.findScript(networkScriptsDir,
"modifyvxlan.sh");
+ String vxlanMode =
AgentPropertiesFileHandler.getPropertyValue(AgentProperties.NETWORK_VXLAN_MODE);
+ String vxlanScript = "evpn".equalsIgnoreCase(vxlanMode) ?
"modifyvxlan-evpn.sh" : "modifyvxlan.sh";
Review Comment:
`vxlanMode` values other than `evpn` silently fall back to the multicast
script. This can hide typos/misconfiguration (e.g., `evnp`) and lead to
unexpected networking behavior. Consider validating the property value (e.g.,
allow only `multicast`/`evpn`) and either throw a `ConfigurationException` or
at least log a warning when an unknown value is provided.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]