Sanjeev N created CLOUDSTACK-4108:
-------------------------------------

             Summary: [Object_store_refactor] Failed to create template from 
snapshot in VMWare with S3 storage
                 Key: CLOUDSTACK-4108
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4108
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: Storage Controller, Template, VMware
    Affects Versions: 4.2.0
         Environment: Latest build from ACS 4.2 branch
Storage: S3 for secondary and ISCSI for primary
            Reporter: Sanjeev N
            Priority: Blocker
             Fix For: 4.2.0


Failed to create template from snapshot in VMWare with S3 storage

Steps to Reproduce:
===============
1.Bring up CS with VMWare cluster using S3 for secondary , NFS for staging and 
ISCSI for primary storage.
2.Deploy guest vm using default cent os template.
3.Create snapshot from the root disk of the vm.
4.Try to create template from the snapshot.

Observations:
============
Template creation failed with Unexpected exception
Log snippet from the management server log as follows:
2013-08-06 06:47:30,027 DEBUG [cloud.async.AsyncJobManagerImpl] 
(catalina-exec-12:null) submit async job-20 = [ 
146cfdb9-afff-4468-a41e-689781b79858 ], details: AsyncJobVO {id:20, userId: 2, 
accountId: 2, sessionKey: null, instanceType: Template, instanceId: 204, cmd: 
org.apache.cloudstack.api.command.user.template.CreateTemplateCmd, 
cmdOriginator: null, cmdInfo: 
{"sessionkey":"foQa9K4dPmYo8uEiAcolaTVR6yI\u003d","cmdEventType":"TEMPLATE.CREATE","ctxUserId":"2","httpmethod":"GET","osTypeId":"257e87ce-fe5f-11e2-a4b5-06045a000066","isPublic":"true","response":"json","isdynamicallyscalable":"false","id":"204","displayText":"fromVM2","snapshotid":"2c859471-370d-45cc-89fa-0c98f7232ed0","passwordEnabled":"false","name":"fromVM2","_":"1375786037905","ctxAccountId":"2","ctxStartEventId":"77"},
 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-08-06 06:47:30,030 DEBUG [cloud.api.ApiServlet] (catalina-exec-12:null) 
===END===  10.146.0.20 -- GET  
command=createTemplate&response=json&sessionkey=foQa9K4dPmYo8uEiAcolaTVR6yI%3D&snapshotid=2c859471-370d-45cc-89fa-0c98f7232ed0&name=fromVM2&displayText=fromVM2&osTypeId=257e87ce-fe5f-11e2-a4b5-06045a000066&isPublic=true&passwordEnabled=false&isdynamicallyscalable=false&_=1375786037905
2013-08-06 06:47:30,032 DEBUG [cloud.async.AsyncJobManagerImpl] 
(Job-Executor-21:job-20 = [ 146cfdb9-afff-4468-a41e-689781b79858 ]) Executing 
org.apache.cloudstack.api.command.user.template.CreateTemplateCmd for job-20 = 
[ 146cfdb9-afff-4468-a41e-689781b79858 ]
2013-08-06 06:47:30,080 DEBUG [storage.image.TemplateDataFactoryImpl] 
(Job-Executor-21:job-20 = [ 146cfdb9-afff-4468-a41e-689781b79858 ]) template 
204 is already in store:7, type:Image
2013-08-06 06:47:30,095 DEBUG [storage.motion.AncientDataMotionStrategy] 
(Job-Executor-21:job-20 = [ 146cfdb9-afff-4468-a41e-689781b79858 ]) copyAsync 
inspecting src type SNAPSHOT copyAsync inspecting dest type TEMPLATE
2013-08-06 06:47:30,123 DEBUG [storage.motion.AncientDataMotionStrategy] 
(Job-Executor-21:job-20 = [ 146cfdb9-afff-4468-a41e-689781b79858 ]) 
needCacheStorage true, dest at 
template/tmpl/2/204/2c3b5b792-8c9d-380b-b982-ac8891d0e9a3 dest role 
Imagesnapshots/2/8/89140ae5-c3e5-40df-8ec9-626773d0ff6b.ova src role Image
2013-08-06 06:47:30,147 DEBUG [storage.motion.AncientDataMotionStrategy] 
(Job-Executor-21:job-20 = [ 146cfdb9-afff-4468-a41e-689781b79858 ]) copyAsync 
inspecting src type SNAPSHOT copyAsync inspecting dest type SNAPSHOT
2013-08-06 06:47:30,233 DEBUG [agent.transport.Request] (Job-Executor-21:job-20 
= [ 146cfdb9-afff-4468-a41e-689781b79858 ]) Seq 3-1317535764: Sending  { Cmd , 
MgmtId: 6615759585382, via: 3, Ver: v1, Flags: 100011, 
[{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.to.SnapshotObjectTO":{"path":"snapshots/2/8/89140ae5-c3e5-40df-8ec9-626773d0ff6b.ova","volume":{"uuid":"972c66f9-dfa8-4745-b817-8a7ddf2049a6","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"b845e7d4-562a-3b2d-8e59-b1df565f99e5","id":1,"poolType":"VMFS","host":"VMFS
 datastore: 
/sanjeev/openFiler","path":"/sanjeev/openFiler","port":0}},"name":"ROOT-8","size":459320832,"path":"ROOT-8","volumeId":8,"vmName":"i-2-8-VM","accountId":2,"format":"OVA","id":8,"hypervisorType":"VMware"},"dataStore":{"com.cloud.agent.api.to.S3TO":{"id":7,"uuid":"575684ac-a5df-4eab-821a-2b7dd214fb86","endPoint":"10.147.29.57:8080","bucketName":"imagestore","httpsFlag":false,"connectionTimeout":500000,"maxErrorRetry":2,"socketTimeout":500000,"created":"Aug
 6, 2013 4:56:09 
AM","enableRRS":false}},"vmName":"i-2-8-VM","name":"vm2_ROOT-8_20130806104047","hypervisorType":"VMware","id":2}},"destTO":{"org.apache.cloudstack.storage.to.SnapshotObjectTO":{"path":"snapshots/2/8","volume":{"uuid":"972c66f9-dfa8-4745-b817-8a7ddf2049a6","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"b845e7d4-562a-3b2d-8e59-b1df565f99e5","id":1,"poolType":"VMFS","host":"VMFS
 datastore: 
/sanjeev/openFiler","path":"/sanjeev/openFiler","port":0}},"name":"ROOT-8","size":459320832,"path":"ROOT-8","volumeId":8,"vmName":"i-2-8-VM","accountId":2,"format":"OVA","id":8,"hypervisorType":"VMware"},"dataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.147.28.7/export/home/sanjeev/sec_esx_os","_role":"ImageCache"}},"vmName":"i-2-8-VM","name":"vm2_ROOT-8_20130806104047","hypervisorType":"VMware","id":2}},"executeInSequence":false,"wait":21600}}]
 }
2013-08-06 06:47:55,261 DEBUG [agent.transport.Request] 
(AgentManager-Handler-8:null) Seq 3-1317535764: Processing:  { Ans: , MgmtId: 
6615759585382, via: 3, Ver: v1, Flags: 10, 
[{"org.apache.cloudstack.storage.command.CopyCmdAnswer":{"newData":{"org.apache.cloudstack.storage.to.SnapshotObjectTO":{"path":"snapshots/2/8/89140ae5-c3e5-40df-8ec9-626773d0ff6b.ova","id":0}},"result":true,"wait":0}}]
 }
2013-08-06 06:47:55,262 DEBUG [agent.transport.Request] (Job-Executor-21:job-20 
= [ 146cfdb9-afff-4468-a41e-689781b79858 ]) Seq 3-1317535764: Received:  { Ans: 
, MgmtId: 6615759585382, via: 3, Ver: v1, Flags: 10, { CopyCmdAnswer } }
2013-08-06 06:47:55,373 DEBUG [agent.transport.Request] (Job-Executor-21:job-20 
= [ 146cfdb9-afff-4468-a41e-689781b79858 ]) Seq 3-1317535765: Sending  { Cmd , 
MgmtId: 6615759585382, via: 3, Ver: v1, Flags: 100011, 
[{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.to.SnapshotObjectTO":{"path":"snapshots/2/8/89140ae5-c3e5-40df-8ec9-626773d0ff6b.ova","volume":{"uuid":"972c66f9-dfa8-4745-b817-8a7ddf2049a6","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"b845e7d4-562a-3b2d-8e59-b1df565f99e5","id":1,"poolType":"VMFS","host":"VMFS
 datastore: 
/sanjeev/openFiler","path":"/sanjeev/openFiler","port":0}},"name":"ROOT-8","size":459320832,"path":"ROOT-8","volumeId":8,"vmName":"i-2-8-VM","accountId":2,"format":"OVA","id":8,"hypervisorType":"VMware"},"dataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.147.28.7/export/home/sanjeev/sec_esx_os","_role":"ImageCache"}},"vmName":"i-2-8-VM","name":"vm2_ROOT-8_20130806104047","hypervisorType":"VMware","id":2}},"destTO":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/2/204/2c3b5b792-8c9d-380b-b982-ac8891d0e9a3","uuid":"d9a70c45-e45d-409f-b725-c8b7157b6959","id":204,"format":"RAW","accountId":2,"hvm":true,"displayText":"fromVM2","imageDataStore":{"com.cloud.agent.api.to.S3TO":{"id":7,"uuid":"575684ac-a5df-4eab-821a-2b7dd214fb86","endPoint":"10.147.29.57:8080","bucketName":"imagestore","httpsFlag":false,"connectionTimeout":500000,"maxErrorRetry":2,"socketTimeout":500000,"created":"Aug
 6, 2013 4:56:09 
AM","enableRRS":false}},"name":"2c3b5b792-8c9d-380b-b982-ac8891d0e9a3","hypervisorType":"VMware"}},"executeInSequence":false,"wait":10800}}]
 }
2013-08-06 06:47:55,500 DEBUG [agent.transport.Request] 
(AgentManager-Handler-9:null) Seq 3-1317535765: Processing:  { Ans: , MgmtId: 
6615759585382, via: 3, Ver: v1, Flags: 10, 
[{"org.apache.cloudstack.storage.command.CopyCmdAnswer":{"result":false,"details":"","wait":0}}]
 }
2013-08-06 06:47:55,503 DEBUG [agent.transport.Request] (Job-Executor-21:job-20 
= [ 146cfdb9-afff-4468-a41e-689781b79858 ]) Seq 3-1317535765: Received:  { Ans: 
, MgmtId: 6615759585382, via: 3, Ver: v1, Flags: 10, { CopyCmdAnswer } }
2013-08-06 06:47:55,520 DEBUG [cloud.template.TemplateManagerImpl] 
(Job-Executor-21:job-20 = [ 146cfdb9-afff-4468-a41e-689781b79858 ]) Failed to 
create template
2013-08-06 06:47:55,535 ERROR [cloud.async.AsyncJobManagerImpl] 
(Job-Executor-21:job-20 = [ 146cfdb9-afff-4468-a41e-689781b79858 ]) Unexpected 
exception while executing 
org.apache.cloudstack.api.command.user.template.CreateTemplateCmd
com.cloud.utils.exception.CloudRuntimeException: Failed to create template
        at 
com.cloud.template.TemplateManagerImpl.createPrivateTemplate(TemplateManagerImpl.java:1378)
        at 
com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
        at 
org.apache.cloudstack.api.command.user.template.CreateTemplateCmd.execute(CreateTemplateCmd.java:263)
        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-06 06:47:55,538 DEBUG [cloud.async.AsyncJobManagerImpl] 
(Job-Executor-21:job-20 = [ 146cfdb9-afff-4468-a41e-689781b79858 ]) Complete 
async job-20 = [ 146cfdb9-afff-4468-a41e-689781b79858 ], jobStatus: 2, 
resultCode: 530, result: Error Code: 530 Error text: Failed to create template

Attaching management server log file and cloud DB.

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