Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6689B10EB5 for ; Sun, 18 Aug 2013 15:55:52 +0000 (UTC) Received: (qmail 65621 invoked by uid 500); 18 Aug 2013 15:55:50 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 65578 invoked by uid 500); 18 Aug 2013 15:55:49 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 65558 invoked by uid 500); 18 Aug 2013 15:55:48 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 65553 invoked by uid 99); 18 Aug 2013 15:55:47 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Aug 2013 15:55:47 +0000 Date: Sun, 18 Aug 2013 15:55:47 +0000 (UTC) From: "Rayees Namathponnan (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CLOUDSTACK-4382) [Automation] Null pointer exception observed while creating template and failed to create template MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-4382?page=3Dcom.atl= assian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rayees Namathponnan updated CLOUDSTACK-4382: -------------------------------------------- Summary: [Automation] Null pointer exception observed while creating te= mplate and failed to create template (was: [Automation] Null pointer exc= eption observed while create template and failed to create template ) =20 > [Automation] Null pointer exception observed while creating template and = failed to create template =20 > -------------------------------------------------------------------------= --------------------------- > > Key: CLOUDSTACK-4382 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-438= 2 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > Components: Automation, Template > Affects Versions: 4.2.0 > Environment: Automation > 4.2 build=20 > Reporter: Rayees Namathponnan > Priority: Critical > Fix For: 4.2.0 > > Attachments: CLOUDSTACK-4382.rar > > > This issue observed during automation run, below test case failed while c= reated template from volume=20 > integration.component.test_project_resources.TestTemplates.test_05_use_pr= ivate_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:nu= ll) =3D=3D=3DSTART=3D=3D=3D 10.223.240.194 -- GET signature=3DmvdYWvPoJrq= p36%2FXzRntaZ%2FILuo%3D&apiKey=3DOxAMQcV0tk > FOsuVOJWP2bmhiz7pAZdiP_vgjA4i7bc1hFL3WlzIRmuc9OQMUHh-BsD---XgmxFiBpj-EirB= qKQ&command=3DqueryAsyncJobResult&response=3Djson&jobid=3D00d37e87-64b8-4ff= d-b164-b275bff12f6a > 2013-08-18 05:00:32,031 ERROR [cloud.async.AsyncJobManagerImpl] (Job-Exec= utor-123:job-941 =3D [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) Unexpected e= xception while executing org. > apache.cloudstack.api.command.user.template.CreateTemplateCmd > com.cloud.utils.exception.CloudRuntimeException: Failed to create templat= ejava.lang.NullPointerException > at com.cloud.template.TemplateManagerImpl.createPrivateTemplate(T= emplateManagerImpl.java:1378) > at com.cloud.utils.component.ComponentInstantiationPostProcessor$= InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:12= 5) > at org.apache.cloudstack.api.command.user.template.CreateTemplate= Cmd.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(ThreadPoolEx= ecutor.java:1110) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolE= xecutor.java:603) > at java.lang.Thread.run(Thread.java:679) > 2013-08-18 05:00:32,033 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Exec= utor-123:job-941 =3D [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) Complete asy= nc job-941 =3D [ 18aa2abd-080b-45db-9da5-59259d4745ee ], jobStatus: 2, resu= ltCode: 530, result: Error Code: 530 Error text: Failed to create templatej= ava.lang.NullPointerException > Please see the attached log; you can see the log "template 216 is alrea= dy 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 =3D 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 =3D [ 18aa2abd-080b-45db-9da5-59259d474= 5ee ], details: AsyncJobVO {id:941, userId: 2, accountId: 2, sessionKey: nu= ll, instanceType: Template, instanceId: 216, cmd: org.apache.cloudstack.api= .command.user.template.CreateTemplateCmd, cmdOriginator: null, cmdInfo: {"c= mdEventType":"TEMPLATE.CREATE","ctxUserId":"2","ispublic":"False","isextrac= table":"False","httpmethod":"GET","volumeid":"90c4e67b-cff4-49fa-9144-332d0= e32ef06","isfeatured":"False","ostypeid":"e0f6404c-07d7-11e3-963b-1a6f7bb0d= 0a8","apiKey":"OxAMQcV0tkFOsuVOJWP2bmhiz7pAZdiP_vgjA4i7bc1hFL3WlzIRmuc9OQMU= Hh-BsD---XgmxFiBpj-EirBqKQ","id":"216","response":"json","name":"Cent OS Te= mplate-FRCOGM","passwordenabled":"False","displaytext":"Cent OS Template","= projectid":"8700f416-53f8-4f19-99d0-37ed044c30dd","ctxAccountId":"2","ctxSt= artEventId":"4200","signature":"lbg8Jtpu8alQ+3xT4ov8oy497v0\u003d"}, cmdVer= sion: 0, callbackType: 0, callbackAddress: null, status: 0, processStatus: = 0, resultCode: 0, result: null, initMsid: 29066118877352, completeMsid: nul= l, lastUpdated: null, lastPolled: null, created: null} > 2013-08-18 05:00:31,642 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Exec= utor-123:job-941 =3D [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) Executing or= g.apache.cloudstack.api.command.user.template.CreateTemplateCmd for job-941= =3D [ 18aa2abd-080b-45db-9da5-59259d4745ee ] > 2013-08-18 05:00:31,689 DEBUG [storage.image.TemplateDataFactoryImpl] (Jo= b-Executor-123:job-941 =3D [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) templa= te 216 is already in store:1, type:Image > 2013-08-18 05:00:31,706 DEBUG [storage.motion.AncientDataMotionStrategy] = (Job-Executor-123:job-941 =3D [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) cop= yAsync 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 =3D [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) Seq 2-1966541217: Se= nding { Cmd , MgmtId: 29066118877352, via: 2, Ver: v1, Flags: 100011, [{"o= rg.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.clo= udstack.storage.to.VolumeObjectTO":{"uuid":"90c4e67b-cff4-49fa-9144-332d0e3= 2ef06","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.P= rimaryDataStoreTO":{"uuid":"fff90cb5-06dd-33b3-8815-d78c08ca01d9","id":1,"p= oolType":"NetworkFilesystem","host":"10.223.110.232","path":"/export/home/r= ayees/SC_QA_AUTO4/primary","port":2049}},"name":"ROOT-281","size":858993459= 2,"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":2= 16,"format":"RAW","accountId":200,"hvm":true,"displayText":"Cent OS Templat= e","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.223.1= 10.232:/export/home/rayees/SC_QA_AUTO4/secondary","_role":"Image"}},"name":= "200aedb25-a160-376e-9600-125d78506e46","hypervisorType":"KVM"}},"executeIn= Sequence":false,"wait":10800}}] } > 2013-08-18 05:00:31,969 DEBUG [agent.transport.Request] (Job-Executor-123= :job-941 =3D [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) Seq 2-1966541217: Re= ceived: { Ans: , MgmtId: 29066118877352, via: 2, Ver: v1, Flags: 10, { Cop= yCmdAnswer } } > 2013-08-18 05:00:31,979 DEBUG [cloud.template.TemplateManagerImpl] (Job-E= xecutor-123:job-941 =3D [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) Failed to= create templatejava.lang.NullPointerException > 2013-08-18 05:00:32,031 ERROR [cloud.async.AsyncJobManagerImpl] (Job-Exec= utor-123:job-941 =3D [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) Unexpected e= xception while executing org.apache.cloudstack.api.command.user.template.Cr= eateTemplateCmd > 2013-08-18 05:00:32,033 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Exec= utor-123:job-941 =3D [ 18aa2abd-080b-45db-9da5-59259d4745ee ]) Complete asy= nc job-941 =3D [ 18aa2abd-080b-45db-9da5-59259d4745ee ], jobStatus: 2, resu= ltCode: 530, result: Error Code: 530 Error text: Failed to create templatej= ava.lang.NullPointerException > 2013-08-18 05:00:36,687 DEBUG [cloud.async.AsyncJobManagerImpl] (catalina= -exec-9:null) Async job-941 =3D [ 18aa2abd-080b-45db-9da5-59259d4745ee ] co= mpleted > [root@msauto4 management]# -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira