[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15168873#comment-15168873
 ] 

Özhan Rüzgar Karaman commented on CLOUDSTACK-9297:
--------------------------------------------------

Hi;
We noticed an issue at delete snapshot function/api for ACS 4.8 and also 4.6, 
when you took some snapshots and you delete its related vm you could not delete 
remaining snapshots. When you try to delete snapshot you receive exception like 
"Error Message : Unable to determine the storage pool of the snapshot."

We checked the management server logs and received exception is below:

2016-02-24 11:37:15,107 ERROR [c.c.a.ApiAsyncJobDispatcher] 
(API-Job-Executor-31:ctx-d769e109 job-1336) (logid:dabf8e11) Unexpected 
exception while 
executing org.apache.cloudstack.api.command.user.snapshot.DeleteSnapshotCmd
com.cloud.utils.exception.CloudRuntimeException: Unable to determine the 
storage pool of the snapshot
        at 
org.apache.cloudstack.storage.snapshot.StorageSystemSnapshotStrategy.canHandle(StorageSystemSnapshotStrategy.java:461)
        at 
org.apache.cloudstack.storage.helper.StorageStrategyFactoryImpl$3.canHandle(StorageStrategyFactoryImpl.java:72)
        at 
org.apache.cloudstack.storage.helper.StorageStrategyFactoryImpl$3.canHandle(StorageStrategyFactoryImpl.java:69)
        at 
org.apache.cloudstack.storage.helper.StorageStrategyFactoryImpl.bestMatch(StorageStrategyFactoryImpl.java:95)
        at 
org.apache.cloudstack.storage.helper.StorageStrategyFactoryImpl.getSnapshotStrategy(StorageStrategyFactoryImpl.java:69)
        at 
com.cloud.storage.snapshot.SnapshotManagerImpl.deleteSnapshot(SnapshotManagerImpl.java:444)
        at sun.reflect.GeneratedMethodAccessor722.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at 
org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:106)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
        at 
com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
        at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at com.sun.proxy.$Proxy187.deleteSnapshot(Unknown Source)
        at 
org.apache.cloudstack.api.command.user.snapshot.DeleteSnapshotCmd.execute(DeleteSnapshotCmd.java:103)
        at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
        at 
com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:108)
        at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:554)
        at 
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
        at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
        at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
        at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
        at 
org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
        at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:502)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
 

To generate this issue, you could use the test cases below:

Test Case 1:
A new vm was created. (NewVM01)
NewVM01 has stopped and took its snapshot. (NewVM01Snap01)
We took 3 more snapshots. (NewVM01Snap02, NewVM01Snap03, NewVM01Snap04)
We delete NewVM01Snap02 snapshot successfully.
We delete NewVM01 vm successfully.
We delete NewVM01Snap01 snapshot successfully.
Then NewVM01Snap03 and NewVM01Snap04 could not be deleted. (Error Message : 
Unable to determine the storage pool of the snapshot.)

Test Case 2:
A new vm was created. (NewVM02)
NewVM01 has stopped and took its snapshot. (NewVM02Snap01)
We took 3 more snapshots. (NewVM02Snap02, NewVM02Snap03, NewVM02Snap04)
We delete NewVM02 vm successfully.
We delete NewVM02Snap01 snapshot successfully.
Then NewVM02Snap02, NewVM02Snap03 and NewVM02Snap04 could not be deleted. 
(Error Message : Unable to determine the storage pool of the snapshot.)

Test Case 3:
A new vm was created. (NewVM03)
Then NewVM03 has stopped and took its snapshot. (NewVM03Snap01)
We took 3 more snapshots. (NewVM03Snap02, NewVM03Snap03, NewVM03Snap04)
Then if we do not delete NewVM02, we can delete all snapshot successfully.




> delete snapshot without id is failing with Unable to determine the storage 
> pool of the snapshot
> -----------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9297
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9297
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: API
>    Affects Versions: 4.8.0
>         Environment: Ubuntu 14.04.3 management + kvm
>            Reporter: Özhan Rüzgar Karaman
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to