apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
1.83k stars 1.07k forks source link

Upload template from local #9302

Open cdfgallo opened 6 days ago

cdfgallo commented 6 days ago
ISSUE TYPE
COMPONENT NAME
secondary storage
CLOUDSTACK VERSION
4.19.0.1
CONFIGURATION

N/A

OS / ENVIRONMENT
SUMMARY

When uploading a template from a local qcow2 file we receive a generic "Network error" even if the upload from the UI looks working (the loading bar goes up to 100% before giving the error) and from the UI, the template is in "Not Ready" state and in status "NotUploaded" on the specific zone.

Looking on the NFS muntpoint on the ssvm we can find the qcow2 present with the template.properties file associated with it.

The ssvm show no error in the connection with master node and connectivitiy is properly working.

I attach here the logs from the agent on the ssvm regarding the issue logs_upload.txt

STEPS TO REPRODUCE
Just load a QCOW2 template from local file
EXPECTED RESULTS
It should be loaded and be available in the UI
ACTUAL RESULTS
It fails and remains in status Not Ready without any possibility of removing it.
rajujith commented 4 days ago

@cdfgallo the logs indicate that SSVM tried locating a VMware template and it can't locate it right. Is it possible that you selected VMware in the template type?

cdfgallo commented 4 days ago

Hi @rajujith, nope, I uploaded a qcow2 indicating KVM as the hypervisor. I saw the error messages about the missing ova but can't understand why they are there.

The log related to the correct file is this: 2024-06-25 15:16:23,287 INFO [storage.resource.HttpUploadServerHandler] (nioEventLoopGroup-3-1:null) BODY FileUpload: FileUpload: content-dis position: form-data; name="files[]"; filename="a9bde272-5350-4a80-b2d3-3b08ac472556.qcow2" But then I don't understand the followed error

Pearl1594 commented 4 days ago

It seems that those warnings are thrown even on successful upload of the template. In the code, it seems like it attempts all the processors; which is why we see it attempting OVA and VMDK processors too despite going through the QCOW2 processor. @cdfgallo Is there any error/warning logs seen in the management server post upload?

cdfgallo commented 4 days ago

@Pearl1594 as far as I saw there was no particular error on the management host. I'll have a better look on next template i will load