[ https://issues.apache.org/jira/browse/CLOUDSTACK-4521?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Abhinav Roy closed CLOUDSTACK-4521. ----------------------------------- Closing the issue as it is not seen with latest build > [upgrade][vmware]Attaching an uploaded volume to a VM throws NPE > ---------------------------------------------------------------- > > Key: CLOUDSTACK-4521 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4521 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Storage Controller, Upgrade, VMware > Affects Versions: 4.2.0 > Environment: Host : ESX 5.0 > upgrade from 3.0.6 to 4.2 > Primary storage : iscsi > secondary storage : nfs > Reporter: Abhinav Roy > Assignee: Min Chen > Fix For: 4.2.1 > > Attachments: CS-4521.zip, re_CS-4521.zip, ssvm logs.zip > > > Steps : > ====================== > 1. Desploy CS 3.0.6 advanced zone setup with esx 5.0 host, iscsi primary > storage and nfs secondary storage > 2. Create vms, snapshots, templates etc. > 3. Upgrade to 4.2 > 4. Create a VM , ex- V-11 > 5. Upload a volume, ex- UV-11 > 6. Attach UV-11 to V-11 > Expected behaviour: > ====================== > Attach volume should succeed > Observed behaviour: > ====================== > Attaching of an uploaded volume fails with : > 2013-08-27 20:54:03,613 DEBUG [cloud.api.ApiServlet] (catalina-exec-17:null) > ===START=== 10.144.6.17 -- GET > command=attachVolume&id=ba0da87e-01f4-4a9d-84a4-4186e161021d&virtualMachineId=6924cda3-88b0-46c0-b826-1af3fb17fa32&response=json&sessionkey=VTc5%2FD4MTl6bTX%2B7GHiy1wakRF4%3D&_=1377617247397 > 2013-08-27 20:54:03,644 DEBUG [cloud.async.AsyncJobManagerImpl] > (catalina-exec-17:null) submit async job-81 = [ > 9e4fa921-e187-4b06-859f-d9a03b4b6145 ], details: AsyncJobVO {id:81, userId: > 2, accountId: 2, sessionKey: null, instanceType: Volume, instanceId: 21, cmd: > org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd, cmdOriginator: > null, cmdInfo: > {"response":"json","id":"ba0da87e-01f4-4a9d-84a4-4186e161021d","sessionkey":"VTc5/D4MTl6bTX+7GHiy1wakRF4\u003d","cmdEventType":"VOLUME.ATTACH","ctxUserId":"2","virtualMachineId":"6924cda3-88b0-46c0-b826-1af3fb17fa32","httpmethod":"GET","_":"1377617247397","ctxAccountId":"2","ctxStartEventId":"243"}, > cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, > processStatus: 0, resultCode: 0, result: null, initMsid: 280320865129348, > completeMsid: null, lastUpdated: null, lastPolled: null, created: null} > 2013-08-27 20:54:03,646 DEBUG [cloud.api.ApiServlet] (catalina-exec-17:null) > ===END=== 10.144.6.17 -- GET > command=attachVolume&id=ba0da87e-01f4-4a9d-84a4-4186e161021d&virtualMachineId=6924cda3-88b0-46c0-b826-1af3fb17fa32&response=json&sessionkey=VTc5%2FD4MTl6bTX%2B7GHiy1wakRF4%3D&_=1377617247397 > 2013-08-27 20:54:03,648 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-67:job-81 = [ 9e4fa921-e187-4b06-859f-d9a03b4b6145 ]) Executing > org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd for job-81 = [ > 9e4fa921-e187-4b06-859f-d9a03b4b6145 ] > 2013-08-27 20:54:03,680 DEBUG [storage.allocator.LocalStoragePoolAllocator] > (Job-Executor-67:job-81 = [ 9e4fa921-e187-4b06-859f-d9a03b4b6145 ]) > LocalStoragePoolAllocator trying to find storage pool to fit the vm > 2013-08-27 20:54:03,681 DEBUG > [storage.allocator.ClusterScopeStoragePoolAllocator] (Job-Executor-67:job-81 > = [ 9e4fa921-e187-4b06-859f-d9a03b4b6145 ]) ClusterScopeStoragePoolAllocator > looking for storage pool > 2013-08-27 20:54:03,681 DEBUG > [storage.allocator.ClusterScopeStoragePoolAllocator] (Job-Executor-67:job-81 > = [ 9e4fa921-e187-4b06-859f-d9a03b4b6145 ]) Looking for pools in dc: 1 pod:1 > cluster:1 > 2013-08-27 20:54:03,685 DEBUG > [storage.allocator.AbstractStoragePoolAllocator] (Job-Executor-67:job-81 = [ > 9e4fa921-e187-4b06-859f-d9a03b4b6145 ]) Checking if storage pool is suitable, > name: null ,poolId: 201 > 2013-08-27 20:54:03,688 DEBUG [cloud.storage.StorageManagerImpl] > (Job-Executor-67:job-81 = [ 9e4fa921-e187-4b06-859f-d9a03b4b6145 ]) Checking > pool 201 for storage, totalSize: 107105746944, usedBytes: 12640583680, > usedPct: 0.11801965852130326, disable threshold: 0.85 > 2013-08-27 20:54:03,695 DEBUG [cloud.storage.StorageManagerImpl] > (Job-Executor-67:job-81 = [ 9e4fa921-e187-4b06-859f-d9a03b4b6145 ]) Checking > pool: 201 for volume allocation [Vol[21|vm=null|DATADISK]], maxSize : > 107105746944, totalAllocatedSize : 14831058944, askingSize : 0, allocated > disable threshold: 0.85 > 2013-08-27 20:54:03,696 DEBUG > [storage.allocator.ClusterScopeStoragePoolAllocator] (Job-Executor-67:job-81 > = [ 9e4fa921-e187-4b06-859f-d9a03b4b6145 ]) FirstFitStoragePoolAllocator > returning 1 suitable storage pools > 2013-08-27 20:54:03,733 DEBUG [storage.motion.AncientDataMotionStrategy] > (Job-Executor-67:job-81 = [ 9e4fa921-e187-4b06-859f-d9a03b4b6145 ]) copyAsync > inspecting src type VOLUME copyAsync inspecting dest type VOLUME > 2013-08-27 20:54:03,757 DEBUG [agent.transport.Request] > (Job-Executor-67:job-81 = [ 9e4fa921-e187-4b06-859f-d9a03b4b6145 ]) Seq > 6-1711538341: Sending { Cmd , MgmtId: 280320865129348, via: 6, Ver: v1, > Flags: 100111, > [{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"ba0da87e-01f4-4a9d-84a4-4186e161021d","volumeType":"DATADISK","dataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.102.192.100/cpg_vol/abhinav/esx-sec-burbank","_role":"Image"}},"name":"uploadvolume","size":0,"path":"volumes/2/21/17605744-8b1e-361a-8f2c-fe61b88a962f.ova","volumeId":21,"accountId":2,"format":"OVA","id":21,"hypervisorType":"VMware"}},"destTO":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"ba0da87e-01f4-4a9d-84a4-4186e161021d","volumeType":"DATADISK","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"07580f3c-3c3d-3ac3-aec6-b36270b8fbc2","id":201,"poolType":"VMFS","host":"VMFS > datastore: > /roydc/primary-iscsi1","path":"/roydc/primary-iscsi1","port":0}},"name":"uploadvolume","size":0,"volumeId":21,"accountId":2,"format":"OVA","id":21,"hypervisorType":"VMware"}},"executeInSequence":true,"wait":10800}}] > } > 2013-08-27 20:54:04,006 DEBUG [agent.manager.AgentManagerImpl] > (AgentManager-Handler-7:null) SeqA 4-50833: Processing Seq 4-50833: { Cmd , > MgmtId: -1, via: 4, Ver: v1, Flags: 11, > [{"com.cloud.agent.api.ConsoleProxyLoadReportCommand":{"_proxyVmId":2,"_loadInfo":"{\n > \"connections\": []\n}","wait":0}}] } > 2013-08-27 20:54:04,009 DEBUG [agent.manager.AgentManagerImpl] > (AgentManager-Handler-7:null) SeqA 4-50833: Sending Seq 4-50833: { Ans: , > MgmtId: 280320865129348, via: 4, Ver: v1, Flags: 100010, > [{"com.cloud.agent.api.AgentControlAnswer":{"result":true,"wait":0}}] } > 2013-08-27 20:54:04,023 DEBUG [agent.transport.Request] > (AgentManager-Handler-5:null) Seq 6-1711538341: Processing: { Ans: , MgmtId: > 280320865129348, via: 6, Ver: v1, Flags: 110, > [{"org.apache.cloudstack.storage.command.CopyCmdAnswer":{"result":false,"details":"copy > volume secondary to primary failed due to exception: Exception: > java.lang.Exception\nMessage: Unable to unpack snapshot OVA file at: > /mnt/SecStorage/17fd8ff0-6b93-3aa5-9e15-b90da1a52e44/volumes/2/21/17605744-8b1e-361a-8f2c-fe61b88a962f.ova\n","wait":0}}] > } > 2013-08-27 20:54:04,024 DEBUG [agent.transport.Request] > (Job-Executor-67:job-81 = [ 9e4fa921-e187-4b06-859f-d9a03b4b6145 ]) Seq > 6-1711538341: Received: { Ans: , MgmtId: 280320865129348, via: 6, Ver: v1, > Flags: 110, { CopyCmdAnswer } } > 2013-08-27 20:54:04,025 DEBUG [agent.manager.AgentAttache] > (AgentManager-Handler-5:null) Seq 6-1711538341: No more commands found > 2013-08-27 20:54:04,030 DEBUG [cloud.storage.VolumeManagerImpl] > (Job-Executor-67:job-81 = [ 9e4fa921-e187-4b06-859f-d9a03b4b6145 ]) copy > volume failed: java.lang.NullPointerException > 2013-08-27 20:54:04,034 ERROR [cloud.async.AsyncJobManagerImpl] > (Job-Executor-67:job-81 = [ 9e4fa921-e187-4b06-859f-d9a03b4b6145 ]) > Unexpected exception while executing > org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd > com.cloud.utils.exception.CloudRuntimeException: copy volume failed: > java.lang.NullPointerException > at > com.cloud.storage.VolumeManagerImpl.copyVolumeFromSecToPrimary(VolumeManagerImpl.java:634) > at > com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125) > at > com.cloud.storage.VolumeManagerImpl.copyVolume(VolumeManagerImpl.java:1512) > at > com.cloud.storage.VolumeManagerImpl.createVolumeOnPrimaryStorage(VolumeManagerImpl.java:1543) > at > com.cloud.storage.VolumeManagerImpl.attachVolumeToVM(VolumeManagerImpl.java:1862) > at > com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125) > at > org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd.execute(AttachVolumeCmd.java:122) > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:158) > at > com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:531) > 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-08-27 20:54:04,038 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-67:job-81 = [ 9e4fa921-e187-4b06-859f-d9a03b4b6145 ]) Complete > async job-81 = [ 9e4fa921-e187-4b06-859f-d9a03b4b6145 ], jobStatus: 2, > resultCode: 530, result: Error Code: 530 Error text: copy volume failed: > java.lang.NullPointerException > This behaviour is specific to uploaded volumes. -- 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