[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-3706?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Min Chen resolved CLOUDSTACK-3706.
----------------------------------

    Resolution: Duplicate
    
> [Object_Store_Refactor] Failed to create template from stopped guest vm's 
> root disk
> -----------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-3706
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3706
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Storage Controller, Template
>    Affects Versions: 4.2.0
>         Environment: Secondary: S3
> Primary : Local Storage
> Cluster: KVM 
>            Reporter: Sanjeev N
>            Assignee: Min Chen
>            Priority: Critical
>             Fix For: 4.2.0
>
>         Attachments: cloud.dmp, management-server.rar, management-server.rar
>
>
> [Object_Store_Refactor] Failed to create template from stopped guest vm's 
> root disk
> Steps to reproduce:
> ================
> 1.Bring up CS in advanced zone with S3 as the secondary storage provider and 
> Local storage as the Primary storage
> 2.Deploy guest vm with default cent os template downloaded after system vms 
> are up
> 3.Stop the guest vm and try to take template from the root volume of the 
> guest vm deployed above
> Following is the snippet from the management server log file:
> 2013-07-17 01:55:15,700 DEBUG [cloud.api.ApiServlet] (catalina-exec-5:null) 
> ===START=== 10.101.255.91 -- GET 
> command=createTemplate&response=json&sessionkey=hv2IwcUdfj2BRf%2FYRDbh4n6KwWU%3D&volumeId=11fe57d4-54d8-46e1-b93b-5e49c9826184&name=cent_vm&displayText=cent_vm&osTypeId=ba38e2b4-edf8-11e2-9c55-06045a000066&isPublic=true&passwordEnabled=false&isfeatured=true&_=1374040515719
> 2013-07-17 01:55:15,855 DEBUG [cloud.template.TemplateManagerImpl] 
> (catalina-exec-5:null) This template is getting created from other template, 
> setting source template Id to: 203
> 2013-07-17 01:55:15,919 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (catalina-exec-5:null) submit async job-39 = [ 
> c7188e7a-dea7-47c4-9a7c-1c1579a3f493 ], details: AsyncJobVO {id:39, userId: 
> 2, accountId: 2, sessionKey: null, instanceType: Template, instanceId: 204, 
> cmd: org.apache.cloudstack.api.command.user.template.CreateTemplateCmd, 
> cmdOriginator: null, cmdInfo: 
> {"sessionkey":"hv2IwcUdfj2BRf/YRDbh4n6KwWU\u003d","cmdEventType":"TEMPLATE.CREATE","volumeId":"11fe57d4-54d8-46e1-b93b-5e49c9826184","ctxUserId":"2","httpmethod":"GET","osTypeId":"ba38e2b4-edf8-11e2-9c55-06045a000066","isPublic":"true","isfeatured":"true","response":"json","id":"204","displayText":"cent_vm","passwordEnabled":"false","name":"cent_vm","_":"1374040515719","ctxAccountId":"2","ctxStartEventId":"136"},
>  cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
> processStatus: 0, resultCode: 0, result: null, initMsid: 6615759585382, 
> completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-07-17 01:55:15,922 DEBUG [cloud.api.ApiServlet] (catalina-exec-5:null) 
> ===END=== 10.101.255.91 -- GET 
> command=createTemplate&response=json&sessionkey=hv2IwcUdfj2BRf%2FYRDbh4n6KwWU%3D&volumeId=11fe57d4-54d8-46e1-b93b-5e49c9826184&name=cent_vm&displayText=cent_vm&osTypeId=ba38e2b4-edf8-11e2-9c55-06045a000066&isPublic=true&passwordEnabled=false&isfeatured=true&_=1374040515719
> 2013-07-17 01:55:15,929 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-39:job-39 = [ c7188e7a-dea7-47c4-9a7c-1c1579a3f493 ]) Executing 
> org.apache.cloudstack.api.command.user.template.CreateTemplateCmd for job-39 
> = [ c7188e7a-dea7-47c4-9a7c-1c1579a3f493 ]
> 2013-07-17 01:55:15,994 DEBUG [storage.motion.AncientDataMotionStrategy] 
> (Job-Executor-39:job-39 = [ c7188e7a-dea7-47c4-9a7c-1c1579a3f493 ]) copyAsync 
> inspecting src type VOLUME copyAsync inspecting dest type TEMPLATE
> 2013-07-17 01:55:16,008 DEBUG [storage.motion.AncientDataMotionStrategy] 
> (Job-Executor-39:job-39 = [ c7188e7a-dea7-47c4-9a7c-1c1579a3f493 ]) 
> needCacheStorage true, dest at 
> template/tmpl/2/204/2425d37ef-3961-3194-996a-913b4e9df00b dest role 
> Image2c4ce55a-5f8a-423b-8c60-a92d77dbf185 src role Primary
> 2013-07-17 01:55:16,030 DEBUG [storage.motion.AncientDataMotionStrategy] 
> (Job-Executor-39:job-39 = [ c7188e7a-dea7-47c4-9a7c-1c1579a3f493 ]) copyAsync 
> inspecting src type VOLUME copyAsync inspecting dest type VOLUME
> 2013-07-17 01:55:16,054 DEBUG [agent.transport.Request] 
> (Job-Executor-39:job-39 = [ c7188e7a-dea7-47c4-9a7c-1c1579a3f493 ]) Seq 
> 1-662441576: Sending { Cmd , MgmtId: 6615759585382, via: 1, Ver: v1, Flags: 
> 100011, 
> [{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"11fe57d4-54d8-46e1-b93b-5e49c9826184","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"03497158-90a8-426c-a02f-8345e4ba9ff8","id":1,"poolType":"Filesystem","host":"10.147.40.14","path":"/var/lib/libvirt/images","port":0}},"name":"ROOT-21","size":139264,"path":"2c4ce55a-5f8a-423b-8c60-a92d77dbf185","volumeId":23,"vmName":"i-2-21-VM","accountId":2,"format":"QCOW2","id":23}},"destTO":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"11fe57d4-54d8-46e1-b93b-5e49c9826184","volumeType":"ROOT","dataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.147.28.7/export/home/sanjeev/sec_kvm_os","_role":"ImageCache"}},"name":"ROOT-21","size":139264,"path":"volumes/2/23","volumeId":23,"vmName":"i-2-21-VM","accountId":2,"format":"QCOW2","id":23}},"executeInSequence":false,"wait":10800}}]
>  }
> 2013-07-17 01:55:16,143 DEBUG [agent.transport.Request] 
> (AgentManager-Handler-15:null) Seq 1-662441576: Processing: { Ans: , MgmtId: 
> 6615759585382, 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-07-17 01:55:16,143 DEBUG [agent.transport.Request] 
> (Job-Executor-39:job-39 = [ c7188e7a-dea7-47c4-9a7c-1c1579a3f493 ]) Seq 
> 1-662441576: Received: { Ans: , MgmtId: 6615759585382, via: 1, Ver: v1, 
> Flags: 10, { UnsupportedAnswer } }
> 2013-07-17 01:55:16,143 WARN [agent.manager.AgentManagerImpl] 
> (Job-Executor-39:job-39 = [ c7188e7a-dea7-47c4-9a7c-1c1579a3f493 ]) 
> Unsupported Command: Unsupported command 
> issued:org.apache.cloudstack.storage.command.CopyCommand. Are you sure you 
> got the right type of server?
> 2013-07-17 01:55:16,163 DEBUG [storage.motion.AncientDataMotionStrategy] 
> (Job-Executor-39:job-39 = [ c7188e7a-dea7-47c4-9a7c-1c1579a3f493 ]) copy 
> object failed: java.lang.NullPointerException
> 2013-07-17 01:55:16,163 DEBUG [storage.motion.AncientDataMotionStrategy] 
> (Job-Executor-39:job-39 = [ c7188e7a-dea7-47c4-9a7c-1c1579a3f493 ]) copy 
> failed
> com.cloud.utils.exception.CloudRuntimeException: 
> java.lang.NullPointerException
>         at 
> org.apache.cloudstack.storage.motion.AncientDataMotionStrategy.copyObject(AncientDataMotionStrategy.java:207)
>         at 
> org.apache.cloudstack.storage.motion.AncientDataMotionStrategy.copyAsync(AncientDataMotionStrategy.java:354)
>         at 
> org.apache.cloudstack.storage.motion.DataMotionServiceImpl.copyAsync(DataMotionServiceImpl.java:55)
>         at 
> org.apache.cloudstack.storage.image.TemplateServiceImpl.copyAsync(TemplateServiceImpl.java:549)
>         at 
> org.apache.cloudstack.storage.image.TemplateServiceImpl.createTemplateFromVolumeAsync(TemplateServiceImpl.java:562)
>         at 
> com.cloud.template.TemplateManagerImpl.createPrivateTemplate(TemplateManagerImpl.java:1361)
>         at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
>         at 
> org.apache.cloudstack.api.command.user.template.CreateTemplateCmd.execute(CreateTemplateCmd.java:256)
>         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-07-17 01:55:16,177 DEBUG [cloud.template.TemplateManagerImpl] 
> (Job-Executor-39:job-39 = [ c7188e7a-dea7-47c4-9a7c-1c1579a3f493 ]) Failed to 
> create templatecom.cloud.utils.exception.CloudRuntimeException: 
> java.lang.NullPointerException
> 2013-07-17 01:55:16,227 ERROR [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-39:job-39 = [ c7188e7a-dea7-47c4-9a7c-1c1579a3f493 ]) 
> Unexpected exception while executing 
> org.apache.cloudstack.api.command.user.template.CreateTemplateCmd
> com.cloud.utils.exception.CloudRuntimeException: Failed to create 
> templatecom.cloud.utils.exception.CloudRuntimeException: 
> java.lang.NullPointerException
>         at 
> com.cloud.template.TemplateManagerImpl.createPrivateTemplate(TemplateManagerImpl.java:1372)
>         at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
>         at 
> org.apache.cloudstack.api.command.user.template.CreateTemplateCmd.execute(CreateTemplateCmd.java:256)
>         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-07-17 01:55:16,230 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-39:job-39 = [ c7188e7a-dea7-47c4-9a7c-1c1579a3f493 ]) Complete 
> async job-39 = [ c7188e7a-dea7-47c4-9a7c-1c1579a3f493 ], jobStatus: 2, 
> resultCode: 530, result: Error Code: 530 Error text: Failed to create 
> templatecom.cloud.utils.exception.CloudRuntimeException: 
> java.lang.NullPointerException 
> Attached management server log file.

--
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