You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "kiranchavala (via GitHub)" <gi...@apache.org> on 2024/03/14 05:01:58 UTC
[I] Unable to destroy/exunge a vm which errored during import [cloudstack]
kiranchavala opened a new issue, #8786:
URL: https://github.com/apache/cloudstack/issues/8786
ISSUE TYPE
BUG
Component Name
Import, kvm
CLOUDSTACK VERSION
Cloudstack version 4.19
SUMMARY
Unable to destroy/exunge a vm which errored during import
This is related to #8785
Steps to reproduce the issue
1. Create a custom service offering

2. Have a qcow2 file present in the shared storage/localstorage
3. Navigate to tools> Import > kvm >


4. Exception

5. Try to delete the vm which got imported

Logs
----
```
2024-03-14 04:55:29,980 INFO [o.a.c.f.j.i.AsyncJobMonitor] (Work-Job-Executor-34:ctx-aa756401 job-1544/job-1547) (logid:eff88948) Remove job-1547 from job monitoring
2024-03-14 04:55:29,990 DEBUG [c.c.u.d.T.Transaction] (API-Job-Executor-94:ctx-695304ce job-1544 ctx-8aa6dcde) (logid:eff88948) Rolling back the transaction: Time = 5 Name = API-Job-Executor-94; called by -TransactionLegacy.rollback:889-TransactionLegacy.removeUpTo:832-TransactionLegacy.close:656-Transaction.execute:38-VirtualMachineManagerImpl.destroy:2269-VMEntityManagerImpl.destroyVirtualMachine:286-VirtualMachineEntityImpl.destroy:235-UserVmManagerImpl.destroyVm:5591-UserVmManagerImpl.destroyVm:3318-GeneratedMethodAccessor1713.invoke:-1-DelegatingMethodAccessorImpl.invoke:43-Method.invoke:566
2024-03-14 04:55:29,996 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-94:ctx-695304ce job-1544) (logid:eff88948) Unexpected exception while executing org.apache.cloudstack.api.command.admin.vm.DestroyVMCmdByAdmin
java.lang.NullPointerException
at com.cloud.vm.UserVmManagerImpl.generateUsageEvent(UserVmManagerImpl.java:4717)
at com.cloud.vm.UserVmStateListener.generateUsageEvent(UserVmStateListener.java:121)
at com.cloud.vm.UserVmStateListener.postStateTransitionEvent(UserVmStateListener.java:108)
at com.cloud.vm.UserVmStateListener.postStateTransitionEvent(UserVmStateListener.java:50)
at com.cloud.utils.fsm.StateMachine2.transitTo(StateMachine2.java:142)
at com.cloud.vm.VirtualMachineManagerImpl.stateTransitTo(VirtualMachineManagerImpl.java:2248)
at com.cloud.vm.VirtualMachineManagerImpl$4.doInTransactionWithoutResult(VirtualMachineManagerImpl.java:2274)
at com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:25)
at com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:21)
at com.cloud.utils.db.Transaction.execute(Transaction.java:40)
at com.cloud.vm.VirtualMachineManagerImpl.destroy(VirtualMachineManagerImpl.java:2269)
at org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl.destroyVirtualMachine(VMEntityManagerImpl.java:286)
at org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl.destroy(VirtualMachineEntityImpl.java:235)
at com.cloud.vm.UserVmManagerImpl.destroyVm(UserVmManagerImpl.java:5591)
at com.cloud.vm.UserVmManagerImpl.destroyVm(UserVmManagerImpl.java:3318)
at jdk.internal.reflect.GeneratedMethodAccessor1713.invoke(Unknown Source)
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.$Proxy199.destroyVm(Unknown Source)
at org.apache.cloudstack.api.command.user.vm.DestroyVMCmd.execute(DestroyVMCmd.java:137)
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)
at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:48)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:45)
at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:602)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecut
```
Actual Behaviour
Unable to destroy the vm
Expected Behaviour
vm should get destroyed
--
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: commits-unsubscribe@cloudstack.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Unable to destroy/exunge a vm which errored during import [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland closed issue #8786: Unable to destroy/exunge a vm which errored during import
URL: https://github.com/apache/cloudstack/issues/8786
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Unable to destroy/exunge a vm which errored during import [cloudstack]
Posted by "pcfriek1987 (via GitHub)" <gi...@apache.org>.
pcfriek1987 commented on issue #8786:
URL: https://github.com/apache/cloudstack/issues/8786#issuecomment-2015790937
I'm guess this issue is also present when trying to migrate a migrated VM? As in thise case https://github.com/apache/cloudstack/issues/8819
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Unable to destroy/exunge a vm which errored during import [cloudstack]
Posted by "pcfriek1987 (via GitHub)" <gi...@apache.org>.
pcfriek1987 commented on issue #8786:
URL: https://github.com/apache/cloudstack/issues/8786#issuecomment-2017486538
I wasn't removing any vm, I would get it when migrating one as mentioned in the case id copied.
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Unable to destroy/exunge a vm which errored during import [cloudstack]
Posted by "vishesh92 (via GitHub)" <gi...@apache.org>.
vishesh92 commented on issue #8786:
URL: https://github.com/apache/cloudstack/issues/8786#issuecomment-2017328518
@pcfriek1987 Can you share the error log that you get while removing the failed VM in your case?
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Unable to destroy/exunge a vm which errored during import [cloudstack]
Posted by "vishesh92 (via GitHub)" <gi...@apache.org>.
vishesh92 commented on issue #8786:
URL: https://github.com/apache/cloudstack/issues/8786#issuecomment-2009873115
This happens because of this issue: https://github.com/apache/cloudstack/issues/8785. When the VM is created (in db), cpu number and speed are not saved for the VM. On expunging the VM, when ACS tries to get CPU number to generate a usage event, it fails because it is null. Fixing #8785 should resolve this as well.
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Unable to destroy/exunge a vm which errored during import [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #8786:
URL: https://github.com/apache/cloudstack/issues/8786#issuecomment-2047030761
as pointed out by @vishesh92 in https://github.com/apache/cloudstack/issues/8786#issuecomment-2009873115 this is fixed/prevented by #8813
@pcfriek1987 , please expand in #8819 if there is more relevance to share.
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org