[
https://issues.apache.org/jira/browse/CLOUDSTACK-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rayees Namathponnan reopened CLOUDSTACK-4382:
---------------------------------------------
Same issue found today run also attaching agent log with this defect
MS log
--------
ype":"KVM"}},"executeInSequence":false,"wait":10800}}] }
2013-08-20 00:52:08,728 DEBUG [agent.manager.AgentManagerImpl]
(AgentManager-Handler-3:null) SeqA 7-1911: Processing Seq 7-1911: { Cmd ,
MgmtId: -1, via: 7, Ver: v1, Flags: 1
1,
[{"com.cloud.agent.api.ConsoleProxyLoadReportCommand":{"_proxyVmId":4,"_loadInfo":"{\n
\"connections\": []\n}","wait":0}}] }
2013-08-20 00:52:08,732 DEBUG [agent.manager.AgentManagerImpl]
(AgentManager-Handler-3:null) SeqA 7-1911: Sending Seq 7-1911: { Ans: ,
MgmtId: 29066118877352, via: 7, Ver: v1
, Flags: 100010,
[{"com.cloud.agent.api.AgentControlAnswer":{"result":true,"wait":0}}] }
2013-08-20 00:52:08,842 DEBUG [agent.transport.Request]
(AgentManager-Handler-4:null) Seq 2-2056129531: Processing: { Ans: , MgmtId:
29066118877352, via: 2, Ver: v1, Flags: 1
0,
[{"org.apache.cloudstack.storage.command.CopyCmdAnswer":{"result":false,"details":"java.lang.NullPointerException","wait":0}}]
}
2013-08-20 00:52:08,842 DEBUG [agent.transport.Request]
(Job-Executor-154:job-1943 = [ 9f6d1a4e-5f4c-4f73-93c3-6e3e972ed8b2 ]) Seq
2-2056129531: Received: { Ans: , MgmtId: 29
066118877352, via: 2, Ver: v1, Flags: 10, { CopyCmdAnswer } }
2013-08-20 00:52:08,854 DEBUG [cloud.template.TemplateManagerImpl]
(Job-Executor-154:job-1943 = [ 9f6d1a4e-5f4c-4f73-93c3-6e3e972ed8b2 ]) Failed
to create templatejava.lang.NullPointerException
2013-08-20 00:52:08,905 ERROR [cloud.async.AsyncJobManagerImpl]
(Job-Executor-154:job-1943 = [ 9f6d1a4e-5f4c-4f73-93c3-6e3e972ed8b2 ])
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-20 00:52:08,907 DEBUG [cloud.async.AsyncJobManagerImpl]
(Job-Executor-154:job-1943 = [ 9f6d1a4e-5f4c-4f73-93c3-6e3e972ed8b2 ]) Complete
async job-1943 = [ 9f6d1a4e-5f4c-4f73-93c3-6e3e972ed8b2 ], jobStatus: 2,
resultCode: 530, result: Error Code: 530 Error text: Failed to create
templatejava.lang.NullPointerException
2013-08-20 00:52:09,823 DEBUG [cloud.api.ApiServlet] (catalina-exec-2:null)
===START=== 10.223.240.194 -- GET
signature=zXRuOGb6PXu%2BkXsIUeJ59uCfpUk%3D&apiKey=TLJgJevirjPhhpj1Vhhw0ZpB3YtffQh20jxawFk-1JJaCPWTljThvlwNWn2ISiANpDGUQAsBVqRitRpIFF_CTg&command=queryAsyncJobResult&response=json&jobid=50099f7f-3201-40ce-a9f4-558d846d5c44
2013-08-20 00:52:09,839 DEBUG [cloud.api.ApiServlet] (catalina-exec-2:null)
===END=== 10.223.240.194 -- GET
signature=zXRuOGb6PXu%2BkXsIUeJ59uCfpUk%3D&apiKey=TLJgJevirjPhhpj1Vhhw0ZpB3YtffQh20jxawFk-1JJaCPWTljThvlwNWn2ISiANpDGUQAsBVqRitRpIFF_CTg&command=queryAsyncJobResult&response=json&jobid=50099f7f-3201-40ce-a9f4-558d846d5c44
2013-08-20 00:52:10,934 DEBUG [cloud.api.ApiServlet] (catalina-exec-10:null)
===START=== 10.223.240.194 -- GET
signature=0ME7rSxQ4mr2xDpZC5MZHdJQ0GQ%3D&apiKey=TLJgJevirjPhhpj1Vhhw0ZpB3YtffQh20jxawFk-1JJaCPWTljThvlwNWn2ISiANpDGUQAsBVqRitRpIFF_CTg&command=queryAsyncJobResult&response=json&jobid=47262f46-0f3d-4915-bb70-46c19cda065c
Agent log
------------
2013-08-20 00:51:51,004 DEBUG [kvm.resource.LibvirtComputingResource]
(agentRequest-Handler-1:null) Execution is successful.
2013-08-20 00:51:58,157 DEBUG [cloud.agent.Agent] (agentRequest-Handler-3:null)
Processing command: com.cloud.agent.api.GetVmStatsCommand
2013-08-20 00:52:23,027 DEBUG [cloud.agent.Agent] (agentRequest-Handler-2:null)
Request:Seq 2-2056129531: { Cmd , MgmtId: 29066118877352, via: 2, Ver: v1,
Flags: 100011,
[{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"557c45e8-b41f-4ce2-b9e8-b0036faf1392","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-405","size":8589934592,"path":"8558e91e-86b4-4ae5-80eb-74b090ce9087","volumeId":450,"accountId":290,"format":"QCOW2","id":450,"hypervisorType":"KVM"}},"destTO":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/290/227","uuid":"b458b571-7952-4c8c-b2b6-c5b01b912b6d","id":227,"format":"RAW","accountId":290,"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":"251eea840-9ab3-3857-b90e-a2520cb6990f","hypervisorType":"KVM"}},"executeInSequence":false,"wait":10800}}]
}
2013-08-20 00:52:23,027 DEBUG [cloud.agent.Agent] (agentRequest-Handler-2:null)
Processing command: org.apache.cloudstack.storage.command.CopyCommand
2013-08-20 00:52:23,029 DEBUG [kvm.storage.LibvirtStorageAdaptor]
(agentRequest-Handler-2:null) createStoragePool didn't find existing running
pool: org.libvirt.LibvirtException: Storage pool not found: no pool with
matching uuid, need to create it
2013-08-20 00:52:23,029 DEBUG [kvm.storage.LibvirtStorageAdaptor]
(agentRequest-Handler-2:null) Didn't find an existing storage pool
ffdee37d-66e9-371d-8e6e-dee20b7f7433 by UUID, checking for pools with duplicate
paths
2013-08-20 00:52:23,030 DEBUG [kvm.storage.LibvirtStorageAdaptor]
(agentRequest-Handler-2:null) Checking path of existing pool
c5e8a74b-1a0b-43ea-bd54-e6f690c8f890 against pool we want to create
2013-08-20 00:52:23,032 DEBUG [kvm.storage.LibvirtStorageAdaptor]
(agentRequest-Handler-2:null) Checking path of existing pool
41b632b5-40b3-3024-a38b-ea259c72579f against pool we want to create
2013-08-20 00:52:23,035 DEBUG [kvm.storage.LibvirtStorageAdaptor]
(agentRequest-Handler-2:null) Checking path of existing pool
c95d4502-e399-3b61-80c9-cda0f310f347 against pool we want to create
2013-08-20 00:52:23,037 DEBUG [kvm.storage.LibvirtStorageAdaptor]
(agentRequest-Handler-2:null) Checking path of existing pool
f4bab6c3-d548-38a2-9708-37cf66286537 against pool we want to create
2013-08-20 00:52:23,039 DEBUG [kvm.storage.LibvirtStorageAdaptor]
(agentRequest-Handler-2:null) Attempting to create storage pool
ffdee37d-66e9-371d-8e6e-dee20b7f7433
2013-08-20 00:52:23,039 DEBUG [kvm.storage.LibvirtStorageAdaptor]
(agentRequest-Handler-2:null) <pool type='netfs'>
<name>ffdee37d-66e9-371d-8e6e-dee20b7f7433</name>
<uuid>ffdee37d-66e9-371d-8e6e-dee20b7f7433</uuid>
This issue might be triggered because of another defect CS- 2729, but still
need to fix NPE
> [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.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