[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-5334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13845269#comment-13845269
 ] 

Gaurav Aradhye commented on CLOUDSTACK-5334:
--------------------------------------------

Hi Rayees,

I tried reproducing this manually (as per the steps you have mentioned) and 
also through test case 
(test_blocker_bugs.Test_Templates.test_02_check_size_snapshotTemplate), but 
couldn't reproduce.

(Manual steps --> Create VM, create snapshot of root disk, create template from 
this snapshot, create vm again from this template | All operations were 
successful)

I also checked the MS logs related to template creation from snapshot, but the 
command present in your log (copySnapshotToTemplateFromNfsToNfs) is missing in 
my Log. Also, there was no NPE.

Please let me know if I am missing something.
Below is the related log:

2013-12-11 01:34:21,675 DEBUG [o.a.c.s.m.AncientDataMotionStrategy] 
(Job-Executor-101:ctx-faaf5090 ctx-102153d9) copyAsync inspecting src type 
SNAPSHOT copyAsyn
c inspecting dest type TEMPLATE
2013-12-11 01:34:21,711 DEBUG [c.c.a.t.Request] (Job-Executor-101:ctx-faaf5090 
ctx-102153d9) Seq 8-2095776316: Sending  { Cmd , MgmtId: 29066118877352, via: 
8(s
-70-QA), Ver: v1, Flags: 100011, 
[{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.to.SnapshotObjectTO":{"path":"sn
apshots/2/966/5044a0ed-5991-47e7-8a4d-27882b07d6cf","volume":{"uuid":"396bd9da-7b9f-4a64-86bb-4aa070c44261","volumeType":"ROOT","dataStore":{"org.apache.cloudst
ack.storage.to.PrimaryDataStoreTO":{"uuid":"41b632b5-40b3-3024-a38b-ea259c72579f","id":2,"poolType":"NetworkFilesystem","host":"10.223.110.232","path":"/export/
home/rayees/SC_QA_AUTO4/primary2","port":2049,"url":"NetworkFilesystem://10.223.110.232//export/home/rayees/SC_QA_AUTO4/primary2/?ROLE=Primary&STOREUUID=41b632b
5-40b3-3024-a38b-ea259c72579f"}},"name":"ROOT-907","size":8589934592,"path":"396bd9da-7b9f-4a64-86bb-4aa070c44261","volumeId":966,"vmName":"i-2-907-QA","account
Id":2,"format":"QCOW2","id":966,"deviceId":0,"hypervisorType":"KVM"},"dataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.223.110.232:/export/home/raye
es/SC_QA_AUTO4/secondary","_role":"Image"}},"vmName":"i-2-907-QA","name":"test-vm_ROOT-907_20131211093157","hypervisorType":"KVM","id":27,"quiescevm":false}},"d
estTO":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/2/242","uuid":"b779f973-d304-4a8f-9a18-d2480cc58021","id":242,"format":"RAW",
"accountId":2,"hvm":true,"displayText":"test-template","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.223.110.232:/export/home/rayees/SC_QA_
AUTO4/secondary","_role":"Image"}},"name":"22ef57484-c9b6-32e8-b32d-0a41567b917f","hypervisorType":"KVM"}},"executeInSequence":false,"wait":10800}}]
 }

> [Automation] Failed to create template from snapshot while executing copy 
> command, observed NPE In SSVM log
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-5334
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5334
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Template
>    Affects Versions: 4.3.0
>         Environment: KVM
> Branch 4.3
>            Reporter: Rayees Namathponnan
>            Assignee: Gaurav Aradhye
>            Priority: Blocker
>             Fix For: 4.3.0
>
>         Attachments: CLOUDSTACK-5334.rar
>
>
> Steps to reproduce 
> Step 1 : snapshot root volume
> Step 2 : Create template from snapshot 
> Result 
> Failed to create template from snapshot, observed below "copy command failure 
> and NPE" in MS log and SSVM log
> MS log
> 2013-12-02 08:28:49,406 DEBUG [o.a.c.s.m.AncientDataMotionStrategy] 
> (Job-Executor-140:ctx-62f776d6 ctx-120aa5f1) copyAsync inspecting src type 
> SNAPSHOT copy
> Async inspecting dest type TEMPLATE
> 2013-12-02 08:28:49,418 DEBUG [c.c.a.t.Request] 
> (Job-Executor-140:ctx-62f776d6 ctx-120aa5f1) Seq 8-1124074796: Sending  { Cmd 
> , MgmtId: 29066118877352, via:
>  8(s-5-VM), Ver: v1, Flags: 100011, 
> [{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.to.SnapshotObjectTO":{"pa
> th":"snapshots/282/589/d2b20627-b60e-489b-9eee-9f4705331a72","dataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.223.110.232:/export/home/rayees/S
> C_QA_AUTO4/secondary","_role":"Image"}},"name":"VM-f9e129c2-8d62-4b70-8105-abd304bf7605_ROOT-526_20131202080509","hypervisorType":"KVM","id":20,"quiescevm":
> false}},"destTO":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/282/236","uuid":"1e48c6bf-388e-4184-93f5-28a21b12329c","id":236
> ,"format":"RAW","accountId":282,"hvm":true,"displayText":"raytemp","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.223.110.232:/export/ho
> me/rayees/SC_QA_AUTO4/secondary","_role":"Image"}},"name":"2c497573e-38cc-3f4d-a73a-49c7b63bbb6c","hypervisorType":"KVM"}},"executeInSequence":false,"wait":
> 10800}}] }
> 2013-12-02 08:28:49,655 DEBUG [c.c.a.t.Request] 
> (AgentManager-Handler-14:null) Seq 8-1124074796: Processing:  { Ans: , 
> MgmtId: 29066118877352, via: 8, Ver:
> v1, Flags: 10, 
> [{"com.cloud.agent.api.Answer":{"result":false,"details":"java.lang.NullPointerException\n\tat
>  org.apache.cloudstack.storage.resource.NfsSeco
> ndaryStorageResource.copySnapshotToTemplateFromNfsToNfs(NfsSecondaryStorageResource.java:449)\n\tat
>  org.apache.cloudstack.storage.resource.NfsSecondaryStora
> geResource.createTemplateFromSnapshot(NfsSecondaryStorageResource.java:546)\n\tat
>  org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource.execute
> (NfsSecondaryStorageResource.java:625)\n\tat 
> org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource.executeRequest(NfsSecondaryStorageResource.j
> ava:236)\n\tat 
> com.cloud.storage.resource.PremiumSecondaryStorageResource.defaultAction(PremiumSecondaryStorageResource.java:63)\n\tat
>  com.cloud.storage.res
> ource.PremiumSecondaryStorageResource.executeRequest(PremiumSecondaryStorageResource.java:59)\n\tat
>  com.cloud.agent.Agent.processRequest(Agent.java:498)\n\t
> at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:806)\n\tat 
> com.cloud.utils.nio.Task.run(Task.java:83)\n\tat 
> java.util.concurrent.ThreadPoolEx
> ecutor.runWorker(ThreadPoolExecutor.java:1146)\n\tat 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\n\tat
>  java.lang.Thread.
> run(Thread.java:679)\n","wait":0}}] }
> 2013-12-02 08:28:49,656 DEBUG [c.c.a.t.Request] 
> (Job-Executor-140:ctx-62f776d6 ctx-120aa5f1) Seq 8-1124074796: Received:  { 
> Ans: , MgmtId: 29066118877352, v
> ia: 8, Ver: v1, Flags: 10, { Answer } }
> 2013-12-02 08:28:49,663 DEBUG [c.c.t.TemplateManagerImpl] 
> (Job-Executor-140:ctx-62f776d6 ctx-120aa5f1) Failed to create 
> templatejava.lang.NullPointerExcepti
> on
>         at 
> org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource.copySnapshotToTemplateFromNfsToNfs(NfsSecondaryStorageResource.java:449)
>         at 
> org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource.createTemplateFromSnapshot(NfsSecondaryStorageResource.java:546)
>         at 
> org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource.execute(NfsSecondaryStorageResource.java:625)
>         at 
> org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource.executeRequest(NfsSecondaryStorageResource.java:236)
>         at 
> com.cloud.storage.resource.PremiumSecondaryStorageResource.defaultAction(PremiumSecondaryStorageResource.java:63)
>         at 
> com.cloud.storage.resource.PremiumSecondaryStorageResource.executeRequest(PremiumSecondaryStorageResource.java:59)
>         at com.cloud.agent.Agent.processRequest(Agent.java:498)
>         at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:806)
>         at com.cloud.utils.nio.Task.run(Task.java:83)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:679)
> SSVM log
> 2013-12-02 16:28:11,308 DEBUG [cloud.agent.Agent] (UgentTask-5:null) Sending 
> ping: Seq 8-263:  { Cmd , MgmtId: -1, via: 8, Ver: v1, Flags: 11, 
> [{"com.cloud.agen
> t.api.PingStorageCommand":{"changes":{},"hostType":"Storage","hostId":8,"wait":0}}]
>  }
> 2013-12-02 16:28:11,350 DEBUG [cloud.agent.Agent] (Agent-Handler-3:null) 
> Received response: Seq 8-263:  { Ans: , MgmtId: 29066118877352, via: 8, Ver: 
> v1, Flags:
>  100010, 
> [{"com.cloud.agent.api.PingAnswer":{"_command":{"hostType":"Storage","hostId":8,"wait":0},"result":true,"wait":0}}]
>  }
> 2013-12-02 16:28:49,422 DEBUG [cloud.agent.Agent] 
> (agentRequest-Handler-2:null) Request:Seq 8-1124074796:  { Cmd , MgmtId: 
> 29066118877352, via: 8, Ver: v1, Flag
> s: 100011, 
> [{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.to.SnapshotObjectTO":{"path":"snapshots/282/589/d2b206
> 27-b60e-489b-9eee-9f4705331a72","dataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.223.110.232:/export/home/rayees/SC_QA_AUTO4/secondary","_role":"Im
> age"}},"name":"VM-f9e129c2-8d62-4b70-8105-abd304bf7605_ROOT-526_20131202080509","hypervisorType":"KVM","id":20,"quiescevm":false}},"destTO":{"org.apache.cloudst
> ack.storage.to.TemplateObjectTO":{"path":"template/tmpl/282/236","uuid":"1e48c6bf-388e-4184-93f5-28a21b12329c","id":236,"format":"RAW","accountId":282,"hvm":tru
> e,"displayText":"raytemp","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_url"
> :"nfs://10.223.110.232:/export/home/rayees/SC_QA_AUTO4/secondary","_role":"Image"}},"name":"2c497573e-38cc-3f4d-a73a-49c7b63bbb6c","hypervisorType":"KVM"}},"executeInSequence":false,"wait":10800}}]
>  }
> 2013-12-02 16:28:49,422 DEBUG [cloud.agent.Agent] 
> (agentRequest-Handler-2:null) Processing command: 
> org.apache.cloudstack.storage.command.CopyCommand
> 2013-12-02 16:28:49,423 INFO  [storage.resource.NfsSecondaryStorageResource] 
> (agentRequest-Handler-2:null) Determined host 10.223.110.232 corresponds to 
> IP 10.223.110.232
> 2013-12-02 16:28:49,509 INFO  [storage.resource.NfsSecondaryStorageResource] 
> (agentRequest-Handler-2:null) Determined host 10.223.110.232 corresponds to 
> IP 10.223.110.232
> 2013-12-02 16:28:49,581 WARN  [cloud.agent.Agent] 
> (agentRequest-Handler-2:null) Caught:
> java.lang.NullPointerException
>         at 
> org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource.copySnapshotToTemplateFromNfsToNfs(NfsSecondaryStorageResource.java:449)
>         at 
> org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource.createTemplateFromSnapshot(NfsSecondaryStorageResource.java:546)
>         at 
> org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource.execute(NfsSecondaryStorageResource.java:625)
>         at 
> org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource.executeRequest(NfsSecondaryStorageResource.java:236)
>         at 
> com.cloud.storage.resource.PremiumSecondaryStorageResource.defaultAction(PremiumSecondaryStorageResource.java:63)
>         at 
> com.cloud.storage.resource.PremiumSecondaryStorageResource.executeRequest(PremiumSecondaryStorageResource.java:59)
>         at com.cloud.agent.Agent.processRequest(Agent.java:498)
>         at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:806)
>         at com.cloud.utils.nio.Task.run(Task.java:83)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:679)
> 2013-12-02 16:28:49,615 DEBUG [cloud.agent.Agent] 
> (agentRequest-Handler-2:null) Seq 8-1124074796:  { Ans: , MgmtId: 
> 29066118877352, via: 8, Ver: v1, Flags: 10, 
> [{"com.cloud.agent.api.Answer":{"result":false,"details":"java.lang.NullPointerException\n\tat
>  
> org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource.copySnapshotToTemplateFromNfsToNfs(NfsSecondaryStorageResource.java:449)\n\tat
>  
> org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource.createTemplateFromSnapshot(NfsSecondaryStorageResource.java:546)\n\tat
>  
> org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource.execute(NfsSecondaryStorageResource.java:625)\n\tat
>  
> org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource.executeRequest(NfsSecondaryStorageResource.java:236)\n\tat
>  
> com.cloud.storage.resource.PremiumSecondaryStorageResource.defaultAction(PremiumSecondaryStorageResource.java:63)\n\tat
>  
> com.cloud.storage.resource.PremiumSecondaryStorageResource.executeRequest(PremiumSecondaryStorageResource.java:59)\n\tat
>  com.cloud.agent.Agent.processRequest(Agent.java:498)\n\tat 
> com.cloud.agent.Agent$AgentRequestHa:



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to