You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unable to delete shared network (with specifyVlan=false and no services)
ISSUE TYPE
Bug Report
COMPONENT NAME
Networks
CLOUDSTACK VERSION
4.19.1
CONFIGURATION
OS / ENVIRONMENT
Agnostic of OS
STEPS TO REPRODUCE
Create a VM, say testvm.
Create a network offering for Shared network with specifyVlan = false and no services ; enable the network offering.
Create a shared network using this offering and provide only IPv4 gateway and netmask (no IP range provided).
Ex: create network acltype=domain name=test-shared-network displaytext=test-shared-network networkofferingid=3dc6968e-6503-4fa3-8a38-09da72d7a846 gateway=1.1.1.1 netmask=255.255.255.0 physicalnetworkid=7691b1b8-2438-4843-9802-cb7f458d7757 zoneid=5b53d47b-d56a-4e6d-927c-3b61a58edf9f
Stop the VM testvm and attach network created (addNicToVirtualMachine) in step3, to the VM.
Start the VM - this will fail.
Remove the network (removeNicFromVirtualMachine) in step3, from the VM. Now, start the VM.
Delete the network created in step 3 - It fails with below exception.
2025-01-24 05:00:13,653 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-37:ctx-c898771c job-126) (logid:65c35a14) Unexpected exception while executing org.apache.cloudstack.api.command.user.network.DeleteNetworkCmd
java.lang.NullPointerException
at com.cloud.network.Networks$BroadcastDomainType.getSchemeValue(Networks.java:178)
at com.cloud.network.Networks$BroadcastDomainType.getValue(Networks.java:232)
at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.deleteVlansInNetwork(NetworkOrchestrator.java:3452)
at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator$13.doInTransaction(NetworkOrchestrator.java:3352)
at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator$13.doInTransaction(NetworkOrchestrator.java:3344)
at com.cloud.utils.db.Transaction$2.doInTransaction(Transaction.java:50)
at com.cloud.utils.db.Transaction.execute(Transaction.java:40)
at com.cloud.utils.db.Transaction.execute(Transaction.java:47)
at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.destroyNetwork(NetworkOrchestrator.java:3344)
at com.cloud.network.NetworkServiceImpl.deleteNetwork(NetworkServiceImpl.java:2695)
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 org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:52)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
at com.sun.proxy.$Proxy168.deleteNetwork(Unknown Source)
at org.apache.cloudstack.api.command.user.network.DeleteNetworkCmd.execute(DeleteNetworkCmd.java:72)
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:172)
at com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:112)
at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:654)
Also, List VM (listVirtualMachines) with networkid (of network in Step 3) list the VM testvm, but doesn't show the nic
EXPECTED RESULTS
List VM with the network shouldn't show the VM when not attached to the network, and Network has to be deleted without any issues.
ACTUAL RESULTS
List VM with the network shows the VM when it is not attached to the network, and delete network fails with an NPE.
The text was updated successfully, but these errors were encountered:
does this: #10168 address the issue? basically, the PR prevents creation of shared networks without an ip range
@Pearl1594, yes, I think so. The NPE is thrown when the broadcast_uri is NULL. If, at least the startip of a shared network is specified, then the broadcast_uri won't be NULL. Therefore, I believe that adding this validation will be enough to solve this issue.
Regarding this bug List VM with the network shouldn't show the VM when not attached to the network, it was fixed in #10204.
Unable to delete shared network (with specifyVlan=false and no services)
ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
CONFIGURATION
OS / ENVIRONMENT
Agnostic of OS
STEPS TO REPRODUCE
Ex:
create network acltype=domain name=test-shared-network displaytext=test-shared-network networkofferingid=3dc6968e-6503-4fa3-8a38-09da72d7a846 gateway=1.1.1.1 netmask=255.255.255.0 physicalnetworkid=7691b1b8-2438-4843-9802-cb7f458d7757 zoneid=5b53d47b-d56a-4e6d-927c-3b61a58edf9f
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: