You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by kiwiflyer <gi...@git.apache.org> on 2016/03/06 17:38:29 UTC

[GitHub] cloudstack pull request: [4.7] CLOUDSTACK-8746: VM Snapshotting im...

Github user kiwiflyer commented on the pull request:

    https://github.com/apache/cloudstack/pull/977#issuecomment-192928078
  
    We've tested this patch against master. Snapshots  work correctly and data is displayed in UI when using supported storage backend (NFS), so nice work!
    
    We also tested it against an upsupported storage backend (Ceph) to see what happened. libvirt obviously returned a failure, but ACS doesn't seem to handle it gracefully. I'd suggest you might want to check what the underlying storage is and immediately return an error, rather than sending it to libvirt and having it fail in a unexpected way.
    
    Here is the exception with Ceph backend on the management logs:
    
    2016-03-06 10:32:33,523 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-2:ctx-32d16d4e job-153) (logid:ccf67994) Unexpected exception while executing org.apache.cloudstack.api.command.user.vmsnapshot.CreateVMSnapshotCmd
    java.lang.RuntimeException: Unexpected exception
            at com.cloud.vm.snapshot.VMSnapshotManagerImpl.creatVMSnapshot(VMSnapshotManagerImpl.java:410)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            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.$Proxy197.creatVMSnapshot(Unknown Source)
            at org.apache.cloudstack.api.command.user.vmsnapshot.CreateVMSnapshotCmd.execute(CreateVMSnapshotCmd.java:113)
            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)
    Caused by: java.lang.NullPointerException
            at com.cloud.vm.snapshot.VMSnapshotManagerImpl.orchestrateCreateVMSnapshot(VMSnapshotManagerImpl.java:1041)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    
    The UI returns an "Unexpected Exception".
    
    If you list the snapshots, the snapshot shows in error and it you try and delete one, you get an exception:
    
    016-03-06 10:36:29,487 ERROR [o.a.c.s.v.DefaultVMSnapshotStrategy] (Work-Job-Executor-4:ctx-721398e0 job-157/job-158 ctx-965269d3) (logid:74099fa3) Delete vm snapshot i-2-26-VM_VS_20160306163232 of vm i-2-26-VM failed due to  Delete VM snapshot failed due to org.libvirt.LibvirtException: Domain snapshot not found: no domain snapshot with matching name 'i-2-26-VM_VS_20160306163232'
    2016-03-06 10:36:29,487 DEBUG [c.c.v.s.VMSnapshotManagerImpl] (Work-Job-Executor-4:ctx-721398e0 job-157/job-158 ctx-965269d3) (logid:74099fa3) Failed to delete vm snapshot: 5
    com.cloud.utils.exception.CloudRuntimeException: Delete vm snapshot i-2-26-VM_VS_20160306163232 of vm i-2-26-VM failed due to  Delete VM snapshot failed due to org.libvirt.LibvirtException: Domain snapshot not found: no domain snapshot with matching name 'i-2-26-VM_VS_20160306163232'
            at org.apache.cloudstack.storage.vmsnapshot.DefaultVMSnapshotStrategy.deleteVMSnapshot(DefaultVMSnapshotStrategy.java:218)
            at com.cloud.vm.snapshot.VMSnapshotManagerImpl.orchestrateDeleteVMSnapshot(VMSnapshotManagerImpl.java:554)
            at com.cloud.vm.snapshot.VMSnapshotManagerImpl.orchestrateDeleteVMSnapshot(VMSnapshotManagerImpl.java:1047)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:606)
            at com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
            at com.cloud.vm.snapshot.VMSnapshotManagerImpl.handleVmWorkJob(VMSnapshotManagerImpl.java:1067)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            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.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.$Proxy197.handleVmWorkJob(Unknown Source)
            at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:102)
            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)
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---