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