You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by "ahmadamirahmadi1401 (via GitHub)" <gi...@apache.org> on 2025/02/12 06:18:18 UTC
[D] i can not Delete Kubernetes Cluster [cloudstack]
GitHub user ahmadamirahmadi1401 created a discussion: i can not Delete Kubernetes Cluster
Hi
CloudStack 4.19.1.3
when i want to delete K8s Cluster i face with follow Error in UI and cloudstack error exception:
(aa) Command failed due to Internal Server Error
```
2025-02-12 06:05:26,406 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-1:ctx-12f3c2fc job-22956) (logid:2821de47) Executing AsyncJobVO: {id:22956, userId: 2, accountId: 2, instanceType: KubernetesCluster, instanceId: 524, cmd: org.apache.cloudstack.api.command.user.kubernetes.cluster.DeleteKubernetesClusterCmd, cmdInfo: {"response":"json","ctxUserId":"2","sessionkey":"JcO4ZmzxffffffJqVh_Oc","httpmethod":"GET","ctxStartEventId":"70574","id":"65d292df-6072-4750-8d51-6d2e73aafd8e","ctxDetails":"{\"interface com.cloud.kubernetes.cluster.KubernetesCluster\":\"65d292df-6072-4750-8d51-6d2e73aafd8e\"}","ctxAccountId":"2","uuid":"65d292df-6072-4750-8d51-6d2e73aafd8e","cmdEventType":"KUBERNETES.CLUSTER.DELETE"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 345051312967, completeMsid: null, lastUpdated: null, lastPolled: null, created: null, removed: null}
2025-02-12 06:05:26,639 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-1:ctx-12f3c2fc job-22956) (logid:2821de47) Unexpected exception while executing org.apache.cloudstack.api.command.user.kubernetes.cluster.DeleteKubernetesClusterCmd
java.lang.NullPointerException
at com.cloud.utils.db.SearchCriteria.findJoin(SearchCriteria.java:178)
at com.cloud.utils.db.SearchCriteria.setJoinParameters(SearchCriteria.java:197)
at com.cloud.vm.dao.VMInstanceDaoImpl.listNonRemovedVmsByTypeAndNetwork(VMInstanceDaoImpl.java:872)
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)
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.$Proxy97.listNonRemovedVmsByTypeAndNetwork(Unknown Source)
at com.cloud.kubernetes.cluster.actionworkers.KubernetesClusterDestroyWorker.destroy(KubernetesClusterDestroyWorker.java:256)
at com.cloud.kubernetes.cluster.KubernetesClusterManagerImpl.deleteKubernetesCluster(KubernetesClusterManagerImpl.java:1449)
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.$Proxy466.deleteKubernetesCluster(Unknown Source)
at org.apache.cloudstack.api.command.user.kubernetes.cluster.DeleteKubernetesClusterCmd.execute(DeleteKubernetesClusterCmd.java:97)
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.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
```
GitHub link: https://github.com/apache/cloudstack/discussions/10374
----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org
Re: [D] i can not Delete Kubernetes Cluster [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
GitHub user weizhouapache edited a comment on the discussion: i can not Delete Kubernetes Cluster
it looks like there is a nic on the network but does not belong to any VM instance.
can you check by the SQL below ?
```
select * from nics where network_id=<network id> and removed is NULL and instance_id is NULL;
```
GitHub link: https://github.com/apache/cloudstack/discussions/10374#discussioncomment-12164208
----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org
Re: [D] i can not Delete Kubernetes Cluster [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
GitHub user weizhouapache added a comment to the discussion: i can not Delete Kubernetes Cluster
oh, then it should nove have the problem
the PR has been merged into 4.19.1.0
GitHub link: https://github.com/apache/cloudstack/discussions/10374#discussioncomment-12167674
----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org
Re: [D] i can not Delete Kubernetes Cluster [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
GitHub user weizhouapache edited a comment on the discussion: i can not Delete Kubernetes Cluster
can you check by the SQL below ?
```
select * from nics where network_id=<network id> and removed is NULL and instance_id is NULL;
```
GitHub link: https://github.com/apache/cloudstack/discussions/10374#discussioncomment-12164208
----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org
Re: [D] i can not Delete Kubernetes Cluster [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
GitHub user DaanHoogland deleted a comment on the discussion: i can not Delete Kubernetes Cluster
I did a short investigation, and independent of the cause of the issue, I think I found a problem in the code:
https://github.com/apache/cloudstack/blob/4.19.1.3/framework/db/src/main/java/com/cloud/utils/db/SearchCriteria.java#L103-L104
it seems line 103 is a problem (still in main as line 104 atm) Though I doubt this will be the root cause It needs addressing anyway.
GitHub link: https://github.com/apache/cloudstack/discussions/10374#discussioncomment-13494493
----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org
Re: [D] i can not Delete Kubernetes Cluster [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
GitHub user weizhouapache added a comment to the discussion: i can not Delete Kubernetes Cluster
this looks like a different issue with #9331
to be confirmed
cc @DaanHoogland
GitHub link: https://github.com/apache/cloudstack/discussions/10374#discussioncomment-12198808
----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org
Re: [D] i can not Delete Kubernetes Cluster [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
GitHub user DaanHoogland added a comment to the discussion: i can not Delete Kubernetes Cluster
I did a short investigation, and independent of the cause of the issue, I think I found a problem in the code:
https://github.com/apache/cloudstack/blob/4.19.1.3/framework/db/src/main/java/com/cloud/utils/db/SearchCriteria.java#L103-L104
it seems line 103 is a problem (still in main as line 104 atm) Though I doubt this will be the root cause It needs addressing anyway.
GitHub link: https://github.com/apache/cloudstack/discussions/10374#discussioncomment-13494493
----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org
Re: [D] i can not Delete Kubernetes Cluster [cloudstack]
Posted by "ahmadamirahmadi007 (via GitHub)" <gi...@apache.org>.
GitHub user ahmadamirahmadi007 added a comment to the discussion: i can not Delete Kubernetes Cluster
this is my output of query:
select * from nics where network_id=819 and removed is NULL and instance_id is NULL;
Empty set (0.00 sec)
@weizhouapache
GitHub link: https://github.com/apache/cloudstack/discussions/10374#discussioncomment-12164884
----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org
Re: [D] i can not Delete Kubernetes Cluster [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
GitHub user weizhouapache added a comment to the discussion: i can not Delete Kubernetes Cluster
it looks like there is a nic on the network but does not belong to any VM instance.
can you check by the SQL below ?
```
select * from nics where network_id=<network id> and removed is NULL and instance_id is NULL;
```
if there is a nic, then run
```
update nics set removed =now() where id=<nic id>;
```
GitHub link: https://github.com/apache/cloudstack/discussions/10374#discussioncomment-12164208
----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org
Re: [D] i can not Delete Kubernetes Cluster [cloudstack]
Posted by "ahmadamirahmadi1401 (via GitHub)" <gi...@apache.org>.
GitHub user ahmadamirahmadi1401 closed a discussion: i can not Delete Kubernetes Cluster
Hi
CloudStack 4.19.1.3
when i want to delete K8s Cluster i face with follow Error in UI and cloudstack error exception:
(aa) Command failed due to Internal Server Error
```
2025-02-12 06:05:26,406 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-1:ctx-12f3c2fc job-22956) (logid:2821de47) Executing AsyncJobVO: {id:22956, userId: 2, accountId: 2, instanceType: KubernetesCluster, instanceId: 524, cmd: org.apache.cloudstack.api.command.user.kubernetes.cluster.DeleteKubernetesClusterCmd, cmdInfo: {"response":"json","ctxUserId":"2","sessionkey":"JcO4ZmzxffffffJqVh_Oc","httpmethod":"GET","ctxStartEventId":"70574","id":"65d292df-6072-4750-8d51-6d2e73aafd8e","ctxDetails":"{\"interface com.cloud.kubernetes.cluster.KubernetesCluster\":\"65d292df-6072-4750-8d51-6d2e73aafd8e\"}","ctxAccountId":"2","uuid":"65d292df-6072-4750-8d51-6d2e73aafd8e","cmdEventType":"KUBERNETES.CLUSTER.DELETE"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 345051312967, completeMsid: null, lastUpdated: null, lastPolled: null, created: null, removed: null}
2025-02-12 06:05:26,639 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-1:ctx-12f3c2fc job-22956) (logid:2821de47) Unexpected exception while executing org.apache.cloudstack.api.command.user.kubernetes.cluster.DeleteKubernetesClusterCmd
java.lang.NullPointerException
at com.cloud.utils.db.SearchCriteria.findJoin(SearchCriteria.java:178)
at com.cloud.utils.db.SearchCriteria.setJoinParameters(SearchCriteria.java:197)
at com.cloud.vm.dao.VMInstanceDaoImpl.listNonRemovedVmsByTypeAndNetwork(VMInstanceDaoImpl.java:872)
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)
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.$Proxy97.listNonRemovedVmsByTypeAndNetwork(Unknown Source)
at com.cloud.kubernetes.cluster.actionworkers.KubernetesClusterDestroyWorker.destroy(KubernetesClusterDestroyWorker.java:256)
at com.cloud.kubernetes.cluster.KubernetesClusterManagerImpl.deleteKubernetesCluster(KubernetesClusterManagerImpl.java:1449)
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.$Proxy466.deleteKubernetesCluster(Unknown Source)
at org.apache.cloudstack.api.command.user.kubernetes.cluster.DeleteKubernetesClusterCmd.execute(DeleteKubernetesClusterCmd.java:97)
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.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
```
GitHub link: https://github.com/apache/cloudstack/discussions/10374
----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org
Re: [D] i can not Delete Kubernetes Cluster [cloudstack]
Posted by "ahmadamirahmadi007 (via GitHub)" <gi...@apache.org>.
GitHub user ahmadamirahmadi007 added a comment to the discussion: i can not Delete Kubernetes Cluster
my cloudstack version is CloudStack 4.19.1.3 now. Should I still have this problem? @weizhouapache
GitHub link: https://github.com/apache/cloudstack/discussions/10374#discussioncomment-12167293
----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org
Re: [D] i can not Delete Kubernetes Cluster [cloudstack]
Posted by "ahmadamirahmadi007 (via GitHub)" <gi...@apache.org>.
GitHub user ahmadamirahmadi007 added a comment to the discussion: i can not Delete Kubernetes Cluster
should i create issue for this problem ?
GitHub link: https://github.com/apache/cloudstack/discussions/10374#discussioncomment-12176027
----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org
Re: [D] i can not Delete Kubernetes Cluster [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
GitHub user DaanHoogland added a comment to the discussion: i can not Delete Kubernetes Cluster
@ahmadamirahmadi1401 , if you have a clear reproduction scenario we can fix this. If not, more investigation is needed.
GitHub link: https://github.com/apache/cloudstack/discussions/10374#discussioncomment-13002364
----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org
Re: [D] i can not Delete Kubernetes Cluster [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
GitHub user weizhouapache edited a comment on the discussion: i can not Delete Kubernetes Cluster
@ahmadamirahmadi007
ok, ignore my previous reply.
this issue looks same as #9331 , which has been fixed by #9339
GitHub link: https://github.com/apache/cloudstack/discussions/10374#discussioncomment-12165807
----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org
Re: [D] i can not Delete Kubernetes Cluster [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
GitHub user weizhouapache added a comment to the discussion: i can not Delete Kubernetes Cluster
@ahmadamirahmadi007
ok, ignore my previous reply.
this issue looks same as #9331 , whicch has been fixed by #9339
GitHub link: https://github.com/apache/cloudstack/discussions/10374#discussioncomment-12165807
----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org
Re: [D] i can not Delete Kubernetes Cluster [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
GitHub user weizhouapache edited a comment on the discussion: i can not Delete Kubernetes Cluster
oh, then it should not have the problem
the PR has been merged into 4.19.1.0
GitHub link: https://github.com/apache/cloudstack/discussions/10374#discussioncomment-12167674
----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@cloudstack.apache.org