Srikanteswararao Talluri created CLOUDSTACK-4007:
----------------------------------------------------
Summary: [ZWPS]NPE while migrating a volume created on zone wide
primary storage
Key: CLOUDSTACK-4007
URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4007
Project: CloudStack
Issue Type: Bug
Security Level: Public (Anyone can view this level - this is the default.)
Components: Volumes
Affects Versions: 4.2.0
Environment: KVM
Reporter: Srikanteswararao Talluri
Priority: Blocker
Fix For: 4.2.0
Steps to reproduce:
==============
1. create a volume on zone wide primary storage and attach it to a VM.
2. detach the volume
3. migrate the detached volume to a different zone wide primary storage
===START=== 10.101.255.7 -- GET
command=migrateVolume&storageid=fec290f3-9361-3dbd-8a96-c861ad85973a&volumeid=00fea7ac-c29d-4883-9a60-ad091d7c35a9&response=json&sessionkey=%2Ffgph8eXl%2BeIzsdyOBQZp9jAEBQ%3D&_=1375351636676
2013-08-01 21:01:47,901 DEBUG [cloud.async.AsyncJobManagerImpl]
(catalina-exec-2:null) submit async job-81 = [
33465551-bd5b-4afc-aa21-8417eeafdddf ], details: AsyncJobVO {id:81, userId: 2,
accountId: 2, sessionKey: null, instanceType: None, instanceId: null, cmd:
org.apache.cloudstack.api.command.user.volume.MigrateVolumeCmd, cmdOriginator:
null, cmdInfo:
{"response":"json","sessionkey":"/fgph8eXl+eIzsdyOBQZp9jAEBQ\u003d","cmdEventType":"VOLUME.MIGRATE","ctxUserId":"2","storageid":"fec290f3-9361-3dbd-8a96-c861ad85973a","httpmethod":"GET","_":"1375351636676","volumeid":"00fea7ac-c29d-4883-9a60-ad091d7c35a9","ctxAccountId":"2","ctxStartEventId":"303"},
cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0,
processStatus: 0, resultCode: 0, result: null, initMsid: 7541090156566,
completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
2013-08-01 21:01:47,905 DEBUG [cloud.api.ApiServlet] (catalina-exec-2:null)
===END=== 10.101.255.7 -- GET
command=migrateVolume&storageid=fec290f3-9361-3dbd-8a96-c861ad85973a&volumeid=00fea7ac-c29d-4883-9a60-ad091d7c35a9&response=json&sessionkey=%2Ffgph8eXl%2BeIzsdyOBQZp9jAEBQ%3D&_=1375351636676
2013-08-01 21:01:47,909 DEBUG [cloud.async.AsyncJobManagerImpl]
(Job-Executor-81:job-81 = [ 33465551-bd5b-4afc-aa21-8417eeafdddf ]) Executing
org.apache.cloudstack.api.command.user.volume.MigrateVolumeCmd for job-81 = [
33465551-bd5b-4afc-aa21-8417eeafdddf ]
2013-08-01 21:01:48,020 DEBUG [storage.motion.AncientDataMotionStrategy]
(Job-Executor-81:job-81 = [ 33465551-bd5b-4afc-aa21-8417eeafdddf ]) copyAsync
inspecting src type VOLUME copyAsync inspecting dest type VOLUME
2013-08-01 21:01:48,031 DEBUG [cache.allocator.StorageCacheRandomAllocator]
(Job-Executor-81:job-81 = [ 33465551-bd5b-4afc-aa21-8417eeafdddf ]) Can't find
staging storage in zone: 1
2013-08-01 21:01:48,120 DEBUG [agent.transport.Request] (Job-Executor-81:job-81
= [ 33465551-bd5b-4afc-aa21-8417eeafdddf ]) Seq 1-259457771: Sending { Cmd ,
MgmtId: 7541090156566, via: 1, Ver: v1, Flags: 100011,
[{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"00fea7ac-c29d-4883-9a60-ad091d7c35a9","volumeType":"DATADISK","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"1fa482ac-85ac-3686-8375-aa596772b466","id":2,"poolType":"NetworkFilesystem","host":"10.147.28.7","path":"/export/home/talluri/zwps1","port":2049}},"name":"zd13","size":0,"path":"94c4d208-de20-4b76-a4ec-a021953fe8c4","volumeId":18,"accountId":2,"format":"QCOW2","id":18,"hypervisorType":"None"}},"destTO":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"00fea7ac-c29d-4883-9a60-ad091d7c35a9","volumeType":"DATADISK","dataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.147.28.7/export/home/pavan/secondary","_role":"Image"}},"name":"zd13","size":0,"path":"volumes/2/18","volumeId":18,"accountId":2,"format":"QCOW2","id":18,"hypervisorType":"None"}},"executeInSequence":false,"wait":10800}}]
}
2013-08-01 21:01:48,130 DEBUG [agent.transport.Request]
(AgentManager-Handler-7:null) Seq 1-259457771: Processing: { Ans: , MgmtId:
7541090156566, via: 1, Ver: v1, Flags: 10,
[{"com.cloud.agent.api.UnsupportedAnswer":{"result":false,"details":"Unsupported
command issued:org.apache.cloudstack.storage.command.CopyCommand. Are you
sure you got the right type of server?","wait":0}}] }
2013-08-01 21:01:48,130 DEBUG [agent.transport.Request] (Job-Executor-81:job-81
= [ 33465551-bd5b-4afc-aa21-8417eeafdddf ]) Seq 1-259457771: Received: { Ans:
, MgmtId: 7541090156566, via: 1, Ver: v1, Flags: 10, { UnsupportedAnswer } }
2013-08-01 21:01:48,130 WARN [agent.manager.AgentManagerImpl]
(Job-Executor-81:job-81 = [ 33465551-bd5b-4afc-aa21-8417eeafdddf ]) Unsupported
Command: Unsupported command
issued:org.apache.cloudstack.storage.command.CopyCommand. Are you sure you got
the right type of server?
2013-08-01 21:01:48,139 DEBUG [storage.motion.AncientDataMotionStrategy]
(Job-Executor-81:job-81 = [ 33465551-bd5b-4afc-aa21-8417eeafdddf ]) copy to
image store failed: Unsupported command
issued:org.apache.cloudstack.storage.command.CopyCommand. Are you sure you got
the right type of server?
2013-08-01 21:01:48,168 DEBUG [storage.image.BaseImageStoreDriverImpl]
(Job-Executor-81:job-81 = [ 33465551-bd5b-4afc-aa21-8417eeafdddf ]) Unable to
destoy VOLUME: 18
java.lang.NullPointerException
at
org.apache.cloudstack.storage.volume.VolumeObject.getPath(VolumeObject.java:338)
at
org.apache.cloudstack.storage.to.VolumeObjectTO.<init>(VolumeObjectTO.java:53)
at
org.apache.cloudstack.storage.volume.VolumeObject.getTO(VolumeObject.java:460)
at
org.apache.cloudstack.storage.image.BaseImageStoreDriverImpl.deleteAsync(BaseImageStoreDriverImpl.java:236)
at
org.apache.cloudstack.storage.image.store.ImageStoreImpl.delete(ImageStoreImpl.java:148)
at
org.apache.cloudstack.storage.motion.AncientDataMotionStrategy.copyVolumeBetweenPools(AncientDataMotionStrategy.java:302)
at
org.apache.cloudstack.storage.motion.AncientDataMotionStrategy.copyAsync(AncientDataMotionStrategy.java:381)
at
org.apache.cloudstack.storage.motion.DataMotionServiceImpl.copyAsync(DataMotionServiceImpl.java:55)
at
org.apache.cloudstack.storage.volume.VolumeServiceImpl.copyVolume(VolumeServiceImpl.java:786)
at
com.cloud.storage.VolumeManagerImpl.migrateVolume(VolumeManagerImpl.java:2192)
at
com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
at
com.cloud.storage.VolumeManagerImpl.migrateVolume(VolumeManagerImpl.java:2184)
at
com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
at
org.apache.cloudstack.api.command.user.volume.MigrateVolumeCmd.execute(MigrateVolumeCmd.java:102)
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:1146)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
2013-08-01 21:01:48,175 WARN [storage.datastore.ObjectInDataStoreManagerImpl]
(Job-Executor-81:job-81 = [ 33465551-bd5b-4afc-aa21-8417eeafdddf ]) Volume 18
is not found on image store 1, so no need to delete
2013-08-01 21:01:48,194 WARN [storage.datastore.ObjectInDataStoreManagerImpl]
(Job-Executor-81:job-81 = [ 33465551-bd5b-4afc-aa21-8417eeafdddf ]) Unsupported
data object (VOLUME,
org.apache.cloudstack.storage.datastore.PrimaryDataStoreImpl@285150a9)
2013-08-01 21:01:48,213 WARN [storage.datastore.ObjectInDataStoreManagerImpl]
(Job-Executor-81:job-81 = [ 33465551-bd5b-4afc-aa21-8417eeafdddf ]) Unsupported
data object (VOLUME,
org.apache.cloudstack.storage.datastore.PrimaryDataStoreImpl@45b8f9e6)
2013-08-01 21:01:48,307 DEBUG [agent.transport.Request] (Job-Executor-81:job-81
= [ 33465551-bd5b-4afc-aa21-8417eeafdddf ]) Seq 1-259457772: Sending { Cmd ,
MgmtId: 7541090156566, via: 1, Ver: v1, Flags: 100011,
[{"org.apache.cloudstack.storage.command.DeleteCommand":{"data":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"923b15b8-2a71-4060-ae62-b54e7b8bb014","volumeType":"DATADISK","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"fec290f3-9361-3dbd-8a96-c861ad85973a","id":3,"poolType":"NetworkFilesystem","host":"10.147.28.7","path":"/export/home/talluri/zwps2","port":2049}},"name":"zd13","size":0,"path":"94c4d208-de20-4b76-a4ec-a021953fe8c4","volumeId":35,"accountId":2,"id":35,"hypervisorType":"None"}},"wait":0}}]
}
2013-08-01 21:01:48,686 DEBUG [agent.transport.Request]
(AgentManager-Handler-8:null) Seq 1-259457772: Processing: { Ans: , MgmtId:
7541090156566, via: 1, Ver: v1, Flags: 10,
[{"com.cloud.agent.api.Answer":{"result":true,"wait":0}}] }
2013-08-01 21:01:48,686 DEBUG [agent.transport.Request] (Job-Executor-81:job-81
= [ 33465551-bd5b-4afc-aa21-8417eeafdddf ]) Seq 1-259457772: Received: { Ans:
, MgmtId: 7541090156566, via: 1, Ver: v1, Flags: 10, { Answer } }
2013-08-01 21:01:48,705 INFO [storage.volume.VolumeServiceImpl]
(Job-Executor-81:job-81 = [ 33465551-bd5b-4afc-aa21-8417eeafdddf ]) Volume 35
is not referred anywhere, remove it from volumes table
2013-08-01 21:01:48,717 ERROR [cloud.storage.VolumeManagerImpl]
(Job-Executor-81:job-81 = [ 33465551-bd5b-4afc-aa21-8417eeafdddf ]) migrate
volume failed:Unsupported command
issued:org.apache.cloudstack.storage.command.CopyCommand. Are you sure you got
the right type of server?
2013-08-01 21:01:48,720 DEBUG [cloud.async.AsyncJobManagerImpl]
(Job-Executor-81:job-81 = [ 33465551-bd5b-4afc-aa21-8417eeafdddf ]) Complete
async job-81 = [ 33465551-bd5b-4afc-aa21-8417eeafdddf ], jobStatus: 2,
resultCode: 530, result: Error Code: 530 Error text: Failed to migrate volume
--
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