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

Rayees Namathponnan updated CLOUDSTACK-4382:
--------------------------------------------

    Attachment: CLOUDSTACK-4382_Log2.rar
    
> [Automation] Null pointer exception observed while creating template and 
> failed to create template  
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-4382
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4382
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Automation, Template
>    Affects Versions: 4.2.0
>         Environment: Automation
> 4.2 build 
>            Reporter: Rayees Namathponnan
>            Assignee: Kishan Kavala
>            Priority: Critical
>             Fix For: 4.2.0
>
>         Attachments: CLOUDSTACK-4382_Log2.rar, CLOUDSTACK-4382.rar
>
>
> This issue observed during automation run, below test case failed while 
> created template from volume 
> integration.component.test_project_resources.TestTemplates.test_05_use_private_template_in_project
> there are other test case doing same operation, its not failed; observed 
> below NPE
> 2013-08-18 05:00:31,990 DEBUG [cloud.api.ApiServlet] (catalina-exec-21:null) 
> ===START===  10.223.240.194 -- GET  
> signature=mvdYWvPoJrqp36%2FXzRntaZ%2FILuo%3D&apiKey=OxAMQcV0tk
> FOsuVOJWP2bmhiz7pAZdiP_vgjA4i7bc1hFL3WlzIRmuc9OQMUHh-BsD---XgmxFiBpj-EirBqKQ&command=queryAsyncJobResult&response=json&jobid=00d37e87-64b8-4ffd-b164-b275bff12f6a
> 2013-08-18 05:00:32,031 ERROR [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-123:job-941 = [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) 
> Unexpected exception while executing org.
> apache.cloudstack.api.command.user.template.CreateTemplateCmd
> com.cloud.utils.exception.CloudRuntimeException: Failed to create 
> templatejava.lang.NullPointerException
>         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-18 05:00:32,033 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-123:job-941 = [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) 
> Complete async job-941 = [ 18aa2abd-080b-45db-9da5-59259d4745ee ], jobStatus: 
> 2, resultCode: 530, result: Error Code: 530 Error text: Failed to create 
> templatejava.lang.NullPointerException
> Please see the  attached log;  you can see the log "template 216 is already 
> in store:1",  it mean CS think template with same already exist ? but i 
> cannot see template 216 in DB
> mysql> select * from vm_template where id = 216;
> Empty set (0.00 sec)
> mysql>
> [root@msauto4 management]# less management-server.log | grep job-941
> 2013-08-18 05:00:31,641 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (catalina-exec-18:null) submit async job-941 = [ 
> 18aa2abd-080b-45db-9da5-59259d4745ee ], details: AsyncJobVO {id:941, userId: 
> 2, accountId: 2, sessionKey: null, instanceType: Template, instanceId: 216, 
> cmd: org.apache.cloudstack.api.command.user.template.CreateTemplateCmd, 
> cmdOriginator: null, cmdInfo: 
> {"cmdEventType":"TEMPLATE.CREATE","ctxUserId":"2","ispublic":"False","isextractable":"False","httpmethod":"GET","volumeid":"90c4e67b-cff4-49fa-9144-332d0e32ef06","isfeatured":"False","ostypeid":"e0f6404c-07d7-11e3-963b-1a6f7bb0d0a8","apiKey":"OxAMQcV0tkFOsuVOJWP2bmhiz7pAZdiP_vgjA4i7bc1hFL3WlzIRmuc9OQMUHh-BsD---XgmxFiBpj-EirBqKQ","id":"216","response":"json","name":"Cent
>  OS Template-FRCOGM","passwordenabled":"False","displaytext":"Cent OS 
> Template","projectid":"8700f416-53f8-4f19-99d0-37ed044c30dd","ctxAccountId":"2","ctxStartEventId":"4200","signature":"lbg8Jtpu8alQ+3xT4ov8oy497v0\u003d"},
>  cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, 
> processStatus: 0, resultCode: 0, result: null, initMsid: 29066118877352, 
> completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-08-18 05:00:31,642 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-123:job-941 = [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) 
> Executing org.apache.cloudstack.api.command.user.template.CreateTemplateCmd 
> for job-941 = [ 18aa2abd-080b-45db-9da5-59259d4745ee ]
> 2013-08-18 05:00:31,689 DEBUG [storage.image.TemplateDataFactoryImpl] 
> (Job-Executor-123:job-941 = [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) 
> template 216 is already in store:1, type:Image
> 2013-08-18 05:00:31,706 DEBUG [storage.motion.AncientDataMotionStrategy] 
> (Job-Executor-123:job-941 = [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) 
> copyAsync inspecting src type VOLUME copyAsync inspecting dest type TEMPLATE
> 2013-08-18 05:00:31,729 DEBUG [agent.transport.Request] 
> (Job-Executor-123:job-941 = [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) Seq 
> 2-1966541217: Sending  { Cmd , MgmtId: 29066118877352, via: 2, Ver: v1, 
> Flags: 100011, 
> [{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"90c4e67b-cff4-49fa-9144-332d0e32ef06","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"fff90cb5-06dd-33b3-8815-d78c08ca01d9","id":1,"poolType":"NetworkFilesystem","host":"10.223.110.232","path":"/export/home/rayees/SC_QA_AUTO4/primary","port":2049}},"name":"ROOT-281","size":8589934592,"path":"12469f8a-4326-4a47-965d-f1f1e5bbc211","volumeId":328,"vmName":"i-200-281-QA","accountId":200,"format":"QCOW2","id":328,"hypervisorType":"KVM"}},"destTO":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/200/216","uuid":"d5ed907d-9bc0-4aab-b7d5-f5e820fafef5","id":216,"format":"RAW","accountId":200,"hvm":true,"displayText":"Cent
>  OS 
> Template","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.223.110.232:/export/home/rayees/SC_QA_AUTO4/secondary","_role":"Image"}},"name":"200aedb25-a160-376e-9600-125d78506e46","hypervisorType":"KVM"}},"executeInSequence":false,"wait":10800}}]
>  }
> 2013-08-18 05:00:31,969 DEBUG [agent.transport.Request] 
> (Job-Executor-123:job-941 = [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) Seq 
> 2-1966541217: Received:  { Ans: , MgmtId: 29066118877352, via: 2, Ver: v1, 
> Flags: 10, { CopyCmdAnswer } }
> 2013-08-18 05:00:31,979 DEBUG [cloud.template.TemplateManagerImpl] 
> (Job-Executor-123:job-941 = [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) Failed 
> to create templatejava.lang.NullPointerException
> 2013-08-18 05:00:32,031 ERROR [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-123:job-941 = [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) 
> Unexpected exception while executing 
> org.apache.cloudstack.api.command.user.template.CreateTemplateCmd
> 2013-08-18 05:00:32,033 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (Job-Executor-123:job-941 = [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) 
> Complete async job-941 = [ 18aa2abd-080b-45db-9da5-59259d4745ee ], jobStatus: 
> 2, resultCode: 530, result: Error Code: 530 Error text: Failed to create 
> templatejava.lang.NullPointerException
> 2013-08-18 05:00:36,687 DEBUG [cloud.async.AsyncJobManagerImpl] 
> (catalina-exec-9:null) Async job-941 = [ 18aa2abd-080b-45db-9da5-59259d4745ee 
> ] completed
> [root@msauto4 management]#

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