sureshanaparti opened a new issue, #10261:
URL: https://github.com/apache/cloudstack/issues/10261

   <!--
   Verify first that your issue/request is not already reported on GitHub.
   Also test if the latest release and main branch are affected too.
   Always add information AFTER of these HTML comments, but no need to delete 
the comments.
   -->
   
   ##### ISSUE TYPE
   
   Unable to delete shared network (with specifyVlan=false and no services)
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
   
   ##### COMPONENT NAME
   <!--
   Categorize the issue, e.g. API, VR, VPN, UI, etc.
   -->
   ~~~
   Networks
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on main 
branch.
   -->
   
   ~~~
   4.19.1
   ~~~
   
   ##### CONFIGURATION
   <!--
   Information about the configuration if relevant, e.g. basic network, 
advanced networking, etc.  N/A otherwise
   -->
   
   
   ##### OS / ENVIRONMENT
   <!--
   Information about the environment if relevant, N/A otherwise
   -->
   Agnostic of OS
   
   
   ##### STEPS TO REPRODUCE
   <!--
   For bugs, show exactly how to reproduce the problem, using a minimal 
test-case. Use Screenshots if accurate.
   
   For new features, show how the feature would be used.
   -->
   
   1. Create a VM, say testvm.
   2. Create a network offering for Shared network with specifyVlan = false and 
no services ; enable the network offering.
   3. 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`
   4. Stop the VM testvm and attach network created (addNicToVirtualMachine) in 
step3, to the VM.
   5. Start the VM - this will fail.
   6. Remove the network (removeNicFromVirtualMachine) in step3, from the VM. 
Now, start the VM.
   7. 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)
   
   ```
   
   8. Also, List VM (listVirtualMachines) with networkid (of network in Step 3) 
list the VM testvm, but  doesn't show the nic 
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   <!-- Paste example playbooks or commands between quotes below -->
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   ~~~
   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
   <!-- What actually happened? -->
   
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   List VM with the network shows the VM when it is not attached to the 
network, and delete network fails with an NPE.
   ~~~
   


-- 
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]

Reply via email to