On Thu, Aug 9, 2018 at 9:10 PM Ketan Pachpande <ketan.pachpa...@veritas.com>
wrote:

> 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.
>

Maybe use libcurl?
https://curl.haxx.se/libcurl/c/example.html


> 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 <nsof...@redhat.com>
> *Sent:* 09 August 2018 23:24
> *To:* Pavan Chavva <pcha...@redhat.com>
> *Cc:* devel <devel@ovirt.org>; Adelino Barbosa <adbar...@redhat.com>;
> Navin Tah <navin....@veritas.com>; Mahesh Falmari <
> mahesh.falm...@veritas.com>; Yaniv Lavi (Dary) <yl...@redhat.com>;
> Sudhakar Paulzagade <sudhakar.paulzag...@veritas.com>; Ketan Pachpande <
> ketan.pachpa...@veritas.com>; Suchitra Herwadkar <
> suchitra.herwad...@veritas.com>; Abhay Marode <abhay.mar...@veritas.com>;
> Daniel Erez <de...@redhat.com>
> *Subject:* [EXTERNAL] Re: [ovirt-devel] Veritas: Image Transfer Finalize
> Call Failure
>
>
>
> On Thu, Aug 9, 2018 at 6:02 PM Pavan Chavva <pcha...@redhat.com> 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)
>
> 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)
>
> [image: 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:
>
> [image: image001.jpg]
>
> [image: image002.jpg]
>
> After that disk is getting deleted automatically.
>
> Sequence of events in events tab:
>
> [image: image003.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 -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
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/devel@ovirt.org/message/64MLY7XEIESXAYKDTFYVGBL3AZTC5C6G/

Reply via email to