Sailaja Mada created CLOUDSTACK-1627:
----------------------------------------

             Summary: NPE while creating volume from snapshot
                 Key: CLOUDSTACK-1627
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1627
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: Management Server, Storage Controller
    Affects Versions: 4.2.0
            Reporter: Sailaja Mada
            Priority: Critical


Setup : Advanced Network with Xen 6.1
Steps:

1. Create Child domain and domain admin account under this domain
2.  Deploy instance 
3. Create volume and attach to this instance
4. Create snapshot for this volume
5. Tried to create volume out of this snapshot.

Observation: It failed with NPE

2013-03-11 21:58:08,501 DEBUG [cloud.alert.AlertManagerImpl] 
(CapacityChecker:null) Done recalculating system capacity
2013-03-11 21:58:08,519 DEBUG [cloud.alert.AlertManagerImpl] 
(CapacityChecker:null) Done running Capacity Checker ...
2013-03-11 21:58:30,938 DEBUG [cloud.api.ApiServlet] (catalina-exec-15:null) 
===START===  10.104.255.13 -- GET  
command=createVolume&response=json&sessionkey=fSJOtk00Gpf0YX%2FFpP44R4K2R2E%3D&snapshotid=674bbe4c-a82f-4a16-8d54-5c582d5ebc1e&name=newvol1&_=1363019390188
2013-03-11 21:58:30,947 DEBUG [cloud.user.AccountManagerImpl] 
(catalina-exec-15:null) Access to Acct[3-cdcadmin1] granted to 
Acct[3-cdcadmin1] by DomainChecker
2013-03-11 21:58:30,950 DEBUG [cloud.user.AccountManagerImpl] 
(catalina-exec-15:null) Access to Acct[3-cdcadmin1] granted to 
Acct[3-cdcadmin1] by DomainChecker
2013-03-11 21:58:30,964 DEBUG [cloud.user.AccountManagerImpl] 
(catalina-exec-15:null) Access to 
com.cloud.storage.SnapshotVO$$EnhancerByCGLIB$$55caa764@3bbbe185 granted to 
Acct[3-cdcadmin1] by DomainChecker
2013-03-11 21:58:31,002 DEBUG [cloud.async.AsyncJobManagerImpl] 
(catalina-exec-15:null) submit async job-32, details: AsyncJobVO {id:32, 
userId: 3, accountId: 3, sessionKey: null, instanceType: null, instanceId: 12, 
cmd: org.apache.cloudstack.api.command.user.volume.CreateVolumeCmd, 
cmdOriginator: null, cmdInfo: 
{"id":"12","response":"json","sessionkey":"fSJOtk00Gpf0YX/FpP44R4K2R2E\u003d","ctxUserId":"3","snapshotid":"674bbe4c-a82f-4a16-8d54-5c582d5ebc1e","name":"newvol1","_":"1363019390188","ctxAccountId":"3","ctxStartEventId":"48"},
 cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
processStatus: 0, resultCode: 0, result: null, initMsid: 222273143235720, 
completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
2013-03-11 21:58:31,004 DEBUG [cloud.api.ApiServlet] (catalina-exec-15:null) 
===END===  10.104.255.13 -- GET  
command=createVolume&response=json&sessionkey=fSJOtk00Gpf0YX%2FFpP44R4K2R2E%3D&snapshotid=674bbe4c-a82f-4a16-8d54-5c582d5ebc1e&name=newvol1&_=1363019390188
2013-03-11 21:58:31,006 DEBUG [cloud.async.AsyncJobManagerImpl] 
(Job-Executor-6:job-32) Executing 
org.apache.cloudstack.api.command.user.volume.CreateVolumeCmd for job-32
2013-03-11 21:58:31,012 DEBUG [cloud.user.AccountManagerImpl] 
(Job-Executor-6:job-32) Access to Acct[3-cdcadmin1] granted to 
Acct[3-cdcadmin1] by DomainChecker
2013-03-11 21:58:31,030 DEBUG [cloud.storage.VolumeManagerImpl] 
(Job-Executor-6:job-32) Failed to create volume: 12
java.lang.NullPointerException
        at 
com.cloud.vm.VirtualMachineProfileImpl.getHypervisorType(VirtualMachineProfileImpl.java:117)
        at 
org.apache.cloudstack.storage.allocator.ZoneWideStoragePoolAllocator.select(ZoneWideStoragePoolAllocator.java:59)
        at 
org.apache.cloudstack.storage.allocator.AbstractStoragePoolAllocator.allocateToPool(AbstractStoragePoolAllocator.java:99)
        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:616)
        at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at 
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
        at 
com.cloud.utils.db.TransactionContextBuilder.AroundAnyMethod(TransactionContextBuilder.java:46)
        at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
        at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
        at 
org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy281.allocateToPool(Unknown Source)
        at 
com.cloud.storage.StorageManagerImpl.findStoragePool(StorageManagerImpl.java:453)
        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:616)
        at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at 
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
        at 
com.cloud.utils.db.TransactionContextBuilder.AroundAnyMethod(TransactionContextBuilder.java:46)
        at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
        at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
        at 
org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy115.findStoragePool(Unknown Source)
        at 
com.cloud.storage.VolumeManagerImpl.createVolumeFromSnapshot(VolumeManagerImpl.java:515)
        at 
com.cloud.storage.VolumeManagerImpl.createVolumeFromSnapshot(VolumeManagerImpl.java:582)
        at 
com.cloud.storage.VolumeManagerImpl.createVolume(VolumeManagerImpl.java:983)
        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:616)
        at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at 
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
        at 
com.cloud.event.ActionEventInterceptor.AroundAnyMethod(ActionEventInterceptor.java:53)
        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:616)
        at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
        at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
        at 
org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
        at 
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
        at 
com.cloud.utils.db.TransactionContextBuilder.AroundAnyMethod(TransactionContextBuilder.java:40)
        at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
        at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
        at 
org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy288.createVolume(Unknown Source)
        at 
org.apache.cloudstack.api.command.user.volume.CreateVolumeCmd.execute(CreateVolumeCmd.java:168)
 at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:165)
        at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
        at 
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at 
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
        at 
com.cloud.utils.db.TransactionContextBuilder.AroundAnyMethod(TransactionContextBuilder.java:46)
        at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
        at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
        at 
org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at 
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)
        at 
com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:437)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:679)
2013-03-11 21:58:31,046 DEBUG [cloud.async.AsyncJobManagerImpl] 
(Job-Executor-6:job-32) Complete async job-32, jobStatus: 2, resultCode: 530, 
result: Error Code: 530 Error text: Failed to create a volume
2013-03-11 21:58:34,343 DEBUG [cloud.api.ApiServlet] (catalina-exec-17:null) 
===START===  10.104.255.13 -- GET  
command=queryAsyncJobResult&jobId=19f03659-fa90-4577-907b-cef3632c24a8&response=json&sessionkey=fSJOtk00Gpf0YX%2FFpP44R4K2R2E%3D&_=1363019394113
2013-03-11 21:58:34,359 DEBUG [cloud.user.AccountManagerImpl] 
(catalina-exec-17:null) Access to Acct[3-cdcadmin1] granted to 
Acct[3-cdcadmin1] by DomainChecker
2013-03-11 21:58:34,362 DEBUG [cloud.async.AsyncJobManagerImpl] 
(catalina-exec-17:null) Async job-32 completed
2013-03-11 21:58:34,368 DEBUG [cloud.api.ApiServlet] (catalina-exec-17:null) 
===END===  10.104.255.13 -- GET  
command=queryAsyncJobResult&jobId=19f03659-fa90-4577-907b-cef3632c24a8&response=json&sessionkey=fSJOtk00Gpf0YX%2FFpP44R4K2R2E%3D&_=1363019394113


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to