On Thu, Aug 9, 2018 at 6:02 PM Pavan Chavva <pchavva(a)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: image005.jpg]
[image: image009.jpg]
After that disk is getting deleted automatically.
Sequence of events in events tab:
[image: 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