<div dir="ltr"><div dir="ltr">On Tue, Nov 19, 2019 at 11:16 AM Martin Kletzander <<a href="mailto:mkletzan@redhat.com">mkletzan@redhat.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, Nov 18, 2019 at 11:53:39PM +0200, Nir Soffer wrote:<br>
>This series extract oVirt SDK and imageio code to make it eaiser to follow the<br>
>code and improve error handing in open() and close().<br>
><br>
>Tested with virt-v2v master.<br>
><br>
>Changes since v1:<br>
>- Rebase on merged patches from v1<br>
>- Fix regression introduced by "rhv-upload: Fix cleanup after errors"<br>
>- Remove "rhv-upload: Try to remove disk on timeout" since it cannot<br>
>  succeed<br>
>- Add more context in debug error logs<br>
>- Use disk_id instead of <a href="http://disk.id" rel="noreferrer" target="_blank">disk.id</a> in close()<br>
><br>
>v1 was here:<br>
><a href="https://www.redhat.com/archives/libguestfs/2019-November/msg00060.html" rel="noreferrer" target="_blank">https://www.redhat.com/archives/libguestfs/2019-November/msg00060.html</a><br>
><br>
>Nir Soffer (11):<br>
>  rhv-upload: Cancel transfer if finalize failed<br>
>  rhv-upload: Keep disk_id in handle<br>
>  rhv-upload: Show disk id in error message<br>
>  rhv-upload: Don't keep transfer_service in handle<br>
>  rhv-upload: Get host before creating disk<br>
>  rhv-upload: Extract create_transfer() function<br>
>  rhv-upload: Show transfer id in error message<br>
>  rhv-upload: Extract imageio helpers<br>
>  rhv-upload: Extract get_options() helper<br>
>  rhv-upload: Extract optimize_http() helper<br>
>  rhv-upload: Clean up username and password<br>
><br>
<br>
I'm not sure which one of these is causing it, it sounds like the first one, but<br>
basically the cleanup path is probably not checked well.  I'm facing a<br>
completely different issue currently, but when updated to your version (in a<br>
hope that it might either provide more data in the error message or even fix it)<br>
I'm now getting a "During handling of the above exception, another exception<br>
occurred", which is not a good thing.  I think it should be easy to fix and also<br>
check for similar issues elsewhere, but I'm now trying to figure out different<br>
things that bother me ('No route to host' changing to 'Network unreachable'<br>
after the patches even though I can connect everywhere the upload plugin is<br>
connecting), so I can't look at it right now.  Here's the traceback:<br>
<br>
Traceback (most recent call last):<br>
  File "/var/tmp/rhvupload.Vw0CIU/rhv-upload-plugin.py", line 94, in open<br>
    options = get_options(http, destination_url)<br>
  File "/var/tmp/rhvupload.Vw0CIU/rhv-upload-plugin.py", line 575, in get_options<br>
    http.request("OPTIONS", url.path)<br>
  File "/usr/lib64/python3.7/http/client.py", line 1252, in request<br>
    self._send_request(method, url, body, headers, encode_chunked)<br>
  File "/usr/lib64/python3.7/http/client.py", line 1298, in _send_request<br>
    self.endheaders(body, encode_chunked=encode_chunked)<br>
  File "/usr/lib64/python3.7/http/client.py", line 1247, in endheaders<br>
    self._send_output(message_body, encode_chunked=encode_chunked)<br>
  File "/usr/lib64/python3.7/http/client.py", line 1026, in _send_output<br>
    self.send(msg)<br>
  File "/usr/lib64/python3.7/http/client.py", line 966, in send<br>
    self.connect()<br>
  File "/usr/lib64/python3.7/http/client.py", line 1414, in connect<br>
    super().connect()<br>
  File "/usr/lib64/python3.7/http/client.py", line 938, in connect<br>
    (self.host,self.port), self.timeout, self.source_address)<br>
  File "/usr/lib64/python3.7/socket.py", line 727, in create_connection<br>
    raise err<br>
  File "/usr/lib64/python3.7/socket.py", line 716, in create_connection<br>
    sock.connect(sa)<br>
OSError: [Errno 101] Network is unreachable<br>
<br>
During handling of the above exception, another exception occurred:<br>
<br>
Traceback (most recent call last):<br>
  File "/var/tmp/rhvupload.Vw0CIU/rhv-upload-plugin.py", line 97, in open<br>
    transfer_service.cancel()<br>
NameError: name 'transfer_service' is not defined<br></blockquote><div><br></div><div>transfer_service is indeed missing in open.</div><div><br></div><div>Thanks for reporting it.</div><div></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> v2v/rhv-upload-plugin.py | 325 ++++++++++++++++++++++-----------------<br>
> 1 file changed, 184 insertions(+), 141 deletions(-)<br>
><br>
>-- <br>
>2.21.0<br>
><br>
><br>
>_______________________________________________<br>
>Libguestfs mailing list<br>
><a href="mailto:Libguestfs@redhat.com" target="_blank">Libguestfs@redhat.com</a><br>
><a href="https://www.redhat.com/mailman/listinfo/libguestfs" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/libguestfs</a><br>
</blockquote></div></div>