Repository navigation
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)
Activity
yadvr commentedon Jun 3, 2021
@GabrielBrascher can you check if it affects 4.15.1.0RC1 too?
yadvr commentedon Jun 3, 2021
cc @weizhouapache
wido commentedon Jun 3, 2021
Afaik it does
weizhouapache commentedon Jun 3, 2021
@rhtyd this seems like a critical issue introduced in 4.15 (#4040 as Gabriel said). I have tested 4.14 which works fine.
yadvr commentedon Jun 3, 2021
@GabrielBrascher are you working on a PR to fix the issue?
GabrielBrascher commentedon Jun 3, 2021
@rhtyd I am sorry for the delay. PR #5074 is out.
I appreciate any test & review 👍
weizhouapache commentedon Jun 4, 2021
@GabrielBrascher
I was trying to reproduce this issue, but the following works for me
(1) create an advanced zone, use VXLAN for guest networks
(2) create an isolated network, create a vm on it.
both succeed. the bridge information on hosts look good also.
could you give more information of your setup ? for example, zone type, network type, physical networks, etc
it would be better to share more logs. Thank you.
GabrielBrascher commentedon Jun 4, 2021
@weizhouapache here follows some details:
Environment
4.15.0.0&4.15.1.0 RC1Cases where I could reproduce the issue
1. Default Guest network is being created while deploying a new Zone via UI wizard:
Command:
Log:
2. creating a new network on an existing Zone (that had been deployed before upgrading to 4.15.0.0)
2.1 via cloudmonkey
Command:
Log:
2.2 via UI
Log:
yadvr commentedon Jun 4, 2021
Thanks @GabrielBrascher by networks it wasn't clear if you meant Shared network or isolated network. Does this feature work in 4.14 or before?
GabrielBrascher commentedon Jun 4, 2021
@rhtyd ah that's the case indeed, shared networks.
It was working in 4.13.1.0; I did not test in 4.14.
weizhouapache commentedon Jun 4, 2021
@GabrielBrascher thanks.
I can reproduce the issue when create shared network with vxlan in advanced zone.
I will test the fix.
kvm: Check for VLAN or VXLAN in NetworkDaoImpl.listByPhysicalNetworkP…
yadvr commentedon Jun 5, 2021
Fixed by #5074
Squashed commit of the following: