Thanks Nir,
I figured out that there was a mismatch in disk format while uploading. 
Corrected it and it started working as expected. Finalize call is successful 
now.

About using SDK, as of now we are bound to use curl from C++, because of our 
own limitations of using python on Netbackup server.
But we will definitely consider your inputs about curl being less efficient and 
less secure.
Also, we will make use transfer_url instead of proxy_url.

Thanks,
Ketan Pachpande

From: Nir Soffer <[email protected]>
Sent: 09 August 2018 23:24
To: Pavan Chavva <[email protected]>
Cc: devel <[email protected]>; Adelino Barbosa <[email protected]>; Navin Tah 
<[email protected]>; Mahesh Falmari <[email protected]>; Yaniv 
Lavi (Dary) <[email protected]>; Sudhakar Paulzagade 
<[email protected]>; Ketan Pachpande 
<[email protected]>; Suchitra Herwadkar 
<[email protected]>; Abhay Marode <[email protected]>; 
Daniel Erez <[email protected]>
Subject: [EXTERNAL] Re: [ovirt-devel] Veritas: Image Transfer Finalize Call 
Failure

On Thu, Aug 9, 2018 at 6:02 PM Pavan Chavva 
<[email protected]<mailto:[email protected]>> wrote:
I have a question regarding imagetransfer finalize call.
After imagetransfer upload, when I call the finalize the transfer, I am getting 
Finalize Failure error.

I am following these steps to upload a disk via rest API.

  1.  Create disk on a storage domain (POST 
https://<ovirt-server>/ovirt-engine/api/disks<https://%3covirt-server%3e/ovirt-engine/api/disks>)
Why not use the SDK?


  1.  Initiate imagetransfer and get the proxy_url and signed_ticket (https:// 
<ovirt-server> /ovirt-engine/api/imagetransfers)
Why are you using proxy_url? The recommended way is to use transfer_url, so
you upload directly to the host. The only reason for using the proxy url is not 
being
able to access the host from the machine doing the upload.


  1.  Upload data using curl (to proxy URL)
[image003.jpg]
curl is less efficient than imageio upload_disk.py from the SDK. Also, using 
curl you are
exposing the transfer id in the command line, so every process running on the 
machine
doing the upload can steal that id and access the image. The proxy_url and 
transfer_url
are sensitive and should not be exposed in the command line.


  1.  Finalize the transfer:
[image005.jpg]
[image009.jpg]

After that disk is getting deleted automatically.
Sequence of events in events tab:
[image010.png]

Is it expected behaviour on finalizing the imagetransfer failure?

Yes, it there was an issue with the upload.

A possible issue may be mismatch between the created disk and the actual data 
uploaded.
For example, incorrect backing file in qcow2 format, or incorrect format, like 
uploading raw
file to qcow2 image.

If so, how to troubleshoot and get the reason of finalizing failure?

Without engine, vdsm, proxy and daemon logs we cannot tell.

Please share:
engine host:
/var/log/ovirt-engine/engine.log
/var/log/ovirt-imageio-proxy/image-proxy.log

host performing the upload:
/var/log/vdsm/vdsm.log
/var/log/ovirt-imageio-daemon/daemon.log

Make sure that all logs include the transfer id - you can find it in the 
proxy_url and fransfer_url:
https://server:port/images/transfer-id

Nir
_______________________________________________
Devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/[email protected]/message/2KHDCFIL4KW5IG7WVDNA7WNZJNDT2PUG/

Reply via email to