<div dir="ltr"><div dir="ltr">On Tue, Nov 19, 2019 at 2:16 PM 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 Tue, Nov 19, 2019 at 01:14:23PM +0200, Nir Soffer wrote:<br>
>On Tue, Nov 19, 2019 at 11:17 AM Martin Kletzander <<a href="mailto:mkletzan@redhat.com" target="_blank">mkletzan@redhat.com</a>> wrote:<br>
>><br>
>> 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>
><br>
>Does this fix the error for you?<br>
><a href="https://github.com/nirs/virt-v2v/commit/2f93dbffad81a26445831293ecac213eadffbd57" rel="noreferrer" target="_blank">https://github.com/nirs/virt-v2v/commit/2f93dbffad81a26445831293ecac213eadffbd57</a><br>
><br>
>I did not test it yet.<br>
><br>
<br>
If I remove the stray `def finalize_transfer(...)` it works, yes.<br></blockquote><div><br></div><div>Right, belongs to the next patch.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
In the meantime I managed to fix the original issue (which I needed to revert to<br>
test this patch =) ), thankfully it was just caused by my oVirt host setup.<br>
<br>
Unfortunately I am getting another issue.  Now nbdkit fails after all the data<br>
is written and it is trying to write the disk id file.  I'm getting "No such<br>
file or directory", so because it is writing to that file I'm assuming the<br>
directory does not exist.  On the other hand it *must* exists because it's the<br>
same one where the python scripts are saved.  So I need to debug more.<br></blockquote><div><br></div><div>This works for me, are you running a modified plugin?</div></div></div>