-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
ISSUE TYPE
- Bug Report
COMPONENT NAME
API
CLOUDSTACK VERSION
4.15.0.0
CONFIGURATION
- Hypervisor: KVM;
- Network: Advanced network;
- Isolation method: VXLAN.
OS / ENVIRONMENT
N/A
SUMMARY
We are facing some issues when creating new networks on the CloudStack 4.15.0.0 (and they extend to 4.15.1 RC1, as well as 4.16-SNAPSHOT); prior to upgrading the same network creation would work; as we had addressed issue #3040 via PR #4190.
This issue seems to be caused due to a validation added in #4040. The respective validation checks explicitly for VLAN; source code line can be found at NetworkDaoImpl.java#L783
public List<NetworkVO> listByPhysicalNetworkPvlan(long physicalNetworkId, String broadcastUri) {
final URI searchUri = BroadcastDomainType.fromString(broadcastUri);
-> if (!searchUri.getScheme().equalsIgnoreCase("vlan")) {
throw new CloudRuntimeException("VLAN requested but URI is not in the expected format: " + searchUri.toString());
}
...
}
STEPS TO REPRODUCE
1. Set a Zone with a physical network isolated via VXLAN
2. Create Network passing VLAN ID (either as 'vlan=vxlan://VID' or simply 'vlan=VID')
EXPECTED RESULTS
The network is created with broadcast URI of vxlan://VID
ACTUAL RESULTS
Network fails to be created.
LOG:
2021-06-03 11:09:55,724 ERROR [c.c.a.ApiServer] (qtp1665620686-39719:ctx-bf7efb52 ctx-c73431d6 ctx-c4105005) (logid:2252fead) unhandled exception executing api command: [Ljava.lang.String;@6b3403ea
com.cloud.utils.exception.CloudRuntimeException: VLAN requested but URI is not in the expected format: vxlan://525
at com.cloud.network.dao.NetworkDaoImpl.listByPhysicalNetworkPvlan(NetworkDaoImpl.java:784)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
Reactions are currently unavailable