MilanHofmann commented on issue #7171:
URL: https://github.com/apache/cloudstack/issues/7171#issuecomment-1422102595

   @slavkap 
   if I create the pool manually and mount the secondary storage to it's source 
directory the agent still fails to get the template.
   Although it is the source directory.
   
![image](https://user-images.githubusercontent.com/56674119/217456257-3e36da59-412d-497e-9f4c-ab3517ef906c.png)
   
   What I understand from the logs is this part:
   `
   2023-02-07 20:25:42,602 INFO  [kvm.storage.LibvirtStorageAdaptor] 
(agentRequest-Handler-3:null) (logid:40b6260a) Storage pool 
73d1d51a-7a3a-3643-833c-a828041be576 was successfully removed from libvirt.
   2023-02-07 20:25:42,603 DEBUG [cloud.agent.Agent] 
(agentRequest-Handler-3:null) (logid:40b6260a) Seq 7-1562186120744141803:  { 
Ans: , MgmtId: 2934858251578, via: 7, Ver: v1, Flags: 110, 
[{"com.cloud.agent.api.storage.PrimaryStorageDownloadAnswer":{"templateSize":"(0
 bytes) 0","result":"false","details":"Failed to get template from pool: 
73d1d51a-7a3a-3643-833c-a828041be576","wait":"0","bypassHostMaintenance":"false"}}]
 }`
   `
   
   Why is the storage pool removed from libvirt before trying to access it?
   
   
   Here are complete the agent logs (starting from where I created the pool 
manually):
   `2023-02-07 20:25:42,470 DEBUG [cloud.agent.Agent] 
(agentRequest-Handler-3:null) (logid:40b6260a) Request:Seq 
7-1562186120744141803:  { Cmd , MgmtId: 2934858251578, via: 7, Ver: v1, Flags: 
100111, 
[{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/1/3/","origUrl":"https://download.cloudstack.org/systemvm/4.17/systemvmtemplate-4.17.2-kvm.qcow2.bz2","uuid":"df635688-a32e-11ed-a71b-02ab532efd3a","id":"3","format":"QCOW2","accountId":"1","checksum":"0e44e12e0a6a370b85d5d7f2ad541354","hvm":"false","displayText":"SystemVM
 Template 
(KVM)","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://3.70.229.74/export/secondary","_role":"Image"}},"name":"routing-3","size":"(0
 bytes) 
0","hypervisorType":"KVM","bootable":"false","uniqueName":"routing-3","directDownload":"false","deployAsIs":"false"}},"destTO":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"origUrl":"https://download.cloudstack.
 
org/systemvm/4.17/systemvmtemplate-4.17.2-kvm.qcow2.bz2","uuid":"df635688-a32e-11ed-a71b-02ab532efd3a","id":"3","format":"QCOW2","accountId":"1","checksum":"0e44e12e0a6a370b85d5d7f2ad541354","hvm":"false","displayText":"SystemVM
 Template 
(KVM)","imageDataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"19986357-feca-4161-830a-2a147fc59d9f","name":"m0995.contaboserver.net-local-19986357","id":"7","poolType":"Filesystem","host":"79.143.179.221","path":"/var/lib/libvirt/images","port":"0","url":"Filesystem://79.143.179.221/var/lib/libvirt/images/?ROLE=Primary&STOREUUID=19986357-feca-4161-830a-2a147fc59d9f","isManaged":"false"}},"name":"routing-3","size":"(0
 bytes) 
0","hypervisorType":"KVM","bootable":"false","uniqueName":"routing-3","directDownload":"false","deployAsIs":"false"}},"executeInSequence":"true","options":{},"options2":{},"wait":"10800","bypassHostMaintenance":"false"}}]
 }
   2023-02-07 20:25:42,470 DEBUG [cloud.agent.Agent] 
(agentRequest-Handler-3:null) (logid:40b6260a) Processing command: 
org.apache.cloudstack.storage.command.CopyCommand
   2023-02-07 20:25:42,470 DEBUG 
[storage.resource.StorageSubsystemCommandHandlerBase] 
(agentRequest-Handler-3:null) (logid:40b6260a) Executing command CopyCommand: 
[{"srcTO":{"path":"template/tmpl/1/3/","origUrl":"https://download.cloudstack.org/systemvm/4.17/systemvmtemplate-4.17.2-kvm.qcow2.bz2","uuid":"df635688-a32e-11ed-a71b-02ab532efd3a","id":3,"format":"QCOW2","accountId":1,"checksum":"0e44e12e0a6a370b85d5d7f2ad541354","hvm":false,"displayText":"SystemVM
 Template 
(KVM)","imageDataStore":{"_url":"nfs://3.70.229.74/export/secondary","_role":"Image"},"name":"routing-3","size":0,"hypervisorType":"KVM","bootable":false,"uniqueName":"routing-3","directDownload":false,"deployAsIs":false},"destTO":{"origUrl":"https://download.cloudstack.org/systemvm/4.17/systemvmtemplate-4.17.2-kvm.qcow2.bz2","uuid":"df635688-a32e-11ed-a71b-02ab532efd3a","id":3,"format":"QCOW2","accountId":1,"checksum":"0e44e12e0a6a370b85d5d7f2ad541354","hvm":false,"displayText":"SystemVM
 Template (KVM)","imageDataSto
 
re":{"uuid":"19986357-feca-4161-830a-2a147fc59d9f","name":"m0995.contaboserver.net-local-19986357","id":7,"poolType":"Filesystem","host":"79.143.179.221","path":"/var/lib/libvirt/images","port":0,"url":"Filesystem://79.143.179.221/var/lib/libvirt/images/?ROLE\u003dPrimary\u0026STOREUUID\u003d19986357-feca-4161-830a-2a147fc59d9f","isManaged":false},"name":"routing-3","size":0,"hypervisorType":"KVM","bootable":false,"uniqueName":"routing-3","directDownload":false,"deployAsIs":false},"executeInSequence":true,"options":{},"options2":{},"contextMap":{"logid":"40b6260a","job":"job-440/job-594"},"wait":10800,"bypassHostMaintenance":false}].
   2023-02-07 20:25:42,471 INFO  [kvm.storage.LibvirtStorageAdaptor] 
(agentRequest-Handler-3:null) (logid:40b6260a) Attempting to create storage 
pool 73d1d51a-7a3a-3643-833c-a828041be576 (NetworkFilesystem) in libvirt
   2023-02-07 20:25:42,471 DEBUG [kvm.resource.LibvirtConnection] 
(agentRequest-Handler-3:null) (logid:40b6260a) Looking for libvirtd connection 
at: qemu:///system
   2023-02-07 20:25:42,489 INFO  [kvm.storage.LibvirtStorageAdaptor] 
(agentRequest-Handler-3:null) (logid:40b6260a) Found existing defined storage 
pool 73d1d51a-7a3a-3643-833c-a828041be576, using it.
   2023-02-07 20:25:42,490 INFO  [kvm.storage.LibvirtStorageAdaptor] 
(agentRequest-Handler-3:null) (logid:40b6260a) Trying to fetch storage pool 
73d1d51a-7a3a-3643-833c-a828041be576 from libvirt
   2023-02-07 20:25:42,490 DEBUG [kvm.resource.LibvirtConnection] 
(agentRequest-Handler-3:null) (logid:40b6260a) Looking for libvirtd connection 
at: qemu:///system
   2023-02-07 20:25:42,514 DEBUG [kvm.storage.LibvirtStorageAdaptor] 
(agentRequest-Handler-3:null) (logid:40b6260a) Successfully refreshed pool 
73d1d51a-7a3a-3643-833c-a828041be576 Capacity: (242.11 GB) 259962437632 Used: 
(9.25 GB) 9936830464 Available: (232.85 GB) 250025607168
   2023-02-07 20:25:42,582 INFO  [kvm.storage.LibvirtStorageAdaptor] 
(agentRequest-Handler-3:null) (logid:40b6260a) Attempting to remove storage 
pool 73d1d51a-7a3a-3643-833c-a828041be576 from libvirt
   2023-02-07 20:25:42,582 DEBUG [kvm.resource.LibvirtConnection] 
(agentRequest-Handler-3:null) (logid:40b6260a) Looking for libvirtd connection 
at: qemu:///system
   2023-02-07 20:25:42,601 INFO  [kvm.storage.LibvirtStorageAdaptor] 
(agentRequest-Handler-3:null) (logid:40b6260a) Storage pool 
73d1d51a-7a3a-3643-833c-a828041be576 has no corresponding secret. Not removing 
any secret.
   2023-02-07 20:25:42,602 INFO  [kvm.storage.LibvirtStorageAdaptor] 
(agentRequest-Handler-3:null) (logid:40b6260a) Storage pool 
73d1d51a-7a3a-3643-833c-a828041be576 was successfully removed from libvirt.
   2023-02-07 20:25:42,603 DEBUG [cloud.agent.Agent] 
(agentRequest-Handler-3:null) (logid:40b6260a) Seq 7-1562186120744141803:  { 
Ans: , MgmtId: 2934858251578, via: 7, Ver: v1, Flags: 110, 
[{"com.cloud.agent.api.storage.PrimaryStorageDownloadAnswer":{"templateSize":"(0
 bytes) 0","result":"false","details":"Failed to get template from pool: 
73d1d51a-7a3a-3643-833c-a828041be576","wait":"0","bypassHostMaintenance":"false"}}]
 }
   2023-02-07 20:25:42,696 DEBUG [cloud.agent.Agent] 
(agentRequest-Handler-4:null) (logid:40b6260a) Request:Seq 
7-1562186120744141804:  { Cmd , MgmtId: 2934858251578, via: 7, Ver: v1, Flags: 
100011, 
[{"com.cloud.agent.api.StopCommand":{"isProxy":"false","checkBeforeCleanup":"false","controlIp":"169.254.127.45","forceStop":"false","volumesToDisconnect":[],"vmName":"v-190-VM","executeInSequence":"false","wait":"0","bypassHostMaintenance":"false"}}]
 }
   2023-02-07 20:25:42,696 DEBUG [cloud.agent.Agent] 
(agentRequest-Handler-4:null) (logid:40b6260a) Processing command: 
com.cloud.agent.api.StopCommand
   2023-02-07 20:25:42,696 DEBUG [resource.wrapper.LibvirtStopCommandWrapper] 
(agentRequest-Handler-4:null) (logid:40b6260a) backing up the cmdline
   `
   `
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to