search for: brokenpipeerror

Displaying 10 results from an estimated 10 matches for "brokenpipeerror".

2018 Aug 28
2
[PATCH] v2v: rhv-upload-plugin: Use BrokenPipeError
With python 3, we have a nicer way to handle socket.error with errno set to EPIPE (or ESHUTDOWN). This is also more correct since in some cases (that I could not reproduce yet with v2v), using e[0] with BrokenPipeError will fail with: >>> OSError(errno.EPIPE, "Broken pipe")[0] Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'BrokenPipeError' object is not subscriptable For python 2 e[0] seems to work, but is leftover from histo...
2018 Aug 28
0
Re: [PATCH] v2v: rhv-upload-plugin: Use BrokenPipeError
On Tue, Aug 28, 2018 at 11:50:56PM +0300, Nir Soffer wrote: > With python 3, we have a nicer way to handle socket.error with errno set > to EPIPE (or ESHUTDOWN). > > This is also more correct since in some cases (that I could not > reproduce yet with v2v), using e[0] with BrokenPipeError will fail with: > > >>> OSError(errno.EPIPE, "Broken pipe")[0] > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: 'BrokenPipeError' object is not subscriptable > > For python 2 e[0] seems...
2018 Aug 28
2
[PATCH RHEL 7.6 LP] RHEL 7.6 LP: Convert Python 3 to Python 2.
Nir, can you confirm this is correct for RHEL 7 / Python 2? Rich.
2018 Aug 28
0
[PATCH RHEL 7.6 LP] RHEL 7.6 LP: Convert Python 3 to Python 2.
...file changed, 6 insertions(+), 4 deletions(-) diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py index 42c7065..3e561e6 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -383,8 +383,9 @@ def pwrite(h, buf, offset): try: http.send(buf) - except BrokenPipeError: - pass + except socket.error as e: + if e.args[0] not in (errno.EPIPE, errno.ESHUTDOWN): + raise r = http.getresponse() if r.status != 200: @@ -446,8 +447,9 @@ def emulate_zero(h, count, offset): http.send(buf) count -= len(...
2018 Dec 07
2
[PATCH] v2v: -o rhv-upload: Fix emulated zero
...http.endheaders() try: buf = bytearray(128*1024) while count > len(buf): http.send(buf) count -= len(buf) - http.send(buffer(buf, 0, count)) + http.send(memoryview(buf)[:count]) except BrokenPipeError: pass r = http.getresponse() if r.status != 200: request_failed(h, r, "could not write zeroes offset %d size %d" % (offset, count)) r.read() def trim(h, count, offset):...
2018 Mar 26
4
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
On Mon, Mar 26, 2018 at 11:41 AM Richard W.M. Jones <rjones@redhat.com> wrote: > On Sun, Mar 25, 2018 at 08:05:14PM +0000, Nir Soffer wrote: > > When using the sdk, you can select both the image format and sparse, so > you > > can create invalid combinations. oVirt selects the allocation for you. > > > > storage type image format sparse | allocation
2018 Mar 29
0
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
..."/usr/lib64/python3.6/ssl.py", line 965, in sendall v = self.send(data[count:]) File "/usr/lib64/python3.6/ssl.py", line 935, in send return self._sslobj.write(data) File "/usr/lib64/python3.6/ssl.py", line 636, in write return self._sslobj.write(data) BrokenPipeError: [Errno 32] Broken pipe qemu-img: error while writing sector 25343488: Input/output error On the server side we see it's something to do with the ticket expiring: 2018-03-29 12:59:24,215 INFO (Thread-18701) [web] START [192.168.0.128] PUT /images/4e8567f6-939d-471f-8ea8-e64d172c0a26 2018-0...
2018 Dec 07
0
Re: [PATCH] v2v: -o rhv-upload: Fix emulated zero
...try: > buf = bytearray(128*1024) > while count > len(buf): > http.send(buf) > count -= len(buf) > - http.send(buffer(buf, 0, count)) > + http.send(memoryview(buf)[:count]) > except BrokenPipeError: > pass > > r = http.getresponse() > if r.status != 200: > request_failed(h, r, > "could not write zeroes offset %d size %d" % > (offset, count)) > >...
2018 Mar 29
2
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...l.py", line 965, in sendall > v = self.send(data[count:]) > File "/usr/lib64/python3.6/ssl.py", line 935, in send > return self._sslobj.write(data) > File "/usr/lib64/python3.6/ssl.py", line 636, in write > return self._sslobj.write(data) > BrokenPipeError: [Errno 32] Broken pipe > qemu-img: error while writing sector 25343488: Input/output error > > On the server side we see it's something to do with the ticket > expiring: > > 2018-03-29 12:59:24,215 INFO (Thread-18701) [web] START [192.168.0.128] > PUT /images/4e8567f6-9...
2020 Jul 08
2
[PATCH] RFC: rhv-upload-plugin: Use imageio client
...http.putheader("Content-Range", "bytes %d-%d/*" % (offset, offset + count - 1)) - http.putheader("Content-Length", str(count)) - http.endheaders() - +def pread(h, buf, offset, flags): + client = h['client'] try: - http.send(buf) - except BrokenPipeError: - pass - - r = http.getresponse() - if r.status != 200: - request_failed(r, - "could not write sector offset %d size %d" % - (offset, count)) - - r.read() + client.read(offset, buf) + except Exception as e: +...