Abhinav Roy created CLOUDSTACK-5217:
---------------------------------------
Summary: [Hyper-V] Attach volume command fails with NPE
Key: CLOUDSTACK-5217
URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5217
Project: CloudStack
Issue Type: Bug
Security Level: Public (Anyone can view this level - this is the default.)
Components: Hypervisor Controller, Management Server
Affects Versions: 4.3.0
Environment: 4.3, Hyper-V, local storage
Reporter: Abhinav Roy
Priority: Critical
Fix For: 4.3.0
Steps :
====================
1. Create an advanced zone setup with hyper-v as the host hypervisor type and
local storage for primary storage
2. Deploy a VM
3. Create a volume
4. Attach the volume created in step 3 to the VM deployed in step 2.
Expected behaviour :
=====================
The Attach volume to VM should be successful
Observed behaviour :
=====================
Attach volume command fails with NPE
2013-11-15 14:09:46,719 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl]
(Job-Executor-11:ctx-f179075a) Executing AsyncJobVO {id:37, userId: 4,
accountId: 4, instanceType: Volume, instanceId: 21, cmd:
org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd, cmdInfo:
{"id":"1373c8cf-d068-4b40-864a-c8d653657e42","response":"json","sessionkey":"/AoEeP8jTsbA3demT287iRqycKk\u003d","cmdEventType":"VOLUME.ATTACH","ctxUserId":"4","virtualMachineId":"d2906ad4-a4ad-4b2c-8ddb-0a38c29ca159","httpmethod":"GET","_":"1384501032200","ctxAccountId":"4","ctxStartEventId":"228"},
cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result:
null, initMsid: 64538137909171, completeMsid: null, lastUpdated: null,
lastPolled: null, created: null}
2013-11-15 14:09:46,752 ERROR [c.c.a.ApiAsyncJobDispatcher]
(Job-Executor-11:ctx-f179075a) Unexpected exception while executing
org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd
java.lang.NullPointerException
at
com.cloud.hypervisor.dao.HypervisorCapabilitiesDaoImpl.getMaxDataVolumesLimit(HypervisorCapabilitiesDaoImpl.java:90)
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:317)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at
com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:33)
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 sun.proxy.$Proxy197.getMaxDataVolumesLimit(Unknown Source)
at
com.cloud.storage.VolumeApiServiceImpl.getMaxDataVolumesSupported(VolumeApiServiceImpl.java:1719)
at
com.cloud.storage.VolumeApiServiceImpl.attachVolumeToVM(VolumeApiServiceImpl.java:1025)
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:317)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at
com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:50)
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 sun.proxy.$Proxy241.attachVolumeToVM(Unknown Source)
at
org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd.execute(AttachVolumeCmd.java:123)
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:161)
at
com.cloud.api.ApiAsyncJobDispatcher.runJobInContext(ApiAsyncJobDispatcher.java:109)
at
com.cloud.api.ApiAsyncJobDispatcher$1.run(ApiAsyncJobDispatcher.java:66)
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
com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:63)
at
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:520)
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
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:1146)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
2013-11-15 14:09:46,755 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl]
(Job-Executor-11:ctx-f179075a) Complete async job-37, jobStatus: FAILED,
resultCode: 530, result:
org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":530}
2013-11-15 14:09:46,760 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl]
(Job-Executor-11:ctx-f179075a) Done executing
org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd for job-37
--
This message was sent by Atlassian JIRA
(v6.1#6144)