search for: highestwrit

Displaying 20 results from an estimated 39 matches for "highestwrit".

Did you mean: highestwrite
2018 Mar 12
2
[PATCH] v2v: -o rhv-upload: Support zero requests.
Only compile tested. I'm keeping this as a separate patch for the moment until the relevant change on the oVirt side goes upstream. Rich.
2018 Jun 29
2
[PATCH] v2v: rhv-upload-plugin: Remove unneeded auth
...headers = {"Range", "bytes=%d-%d" % (offset, offset+count-1)} - # Authorization is only needed for old imageio. if h['needs_auth']: headers["Authorization"] = transfer.signed_ticket @@ -321,7 +321,6 @@ def pwrite(h, buf, offset): h['highestwrite'] = max(h['highestwrite'], offset+count) http.putrequest("PUT", h['path'] + "?flush=n") - # Authorization is only needed for old imageio. if h['needs_auth']: http.putheader("Authorization", transfer.signed_ticket)...
2018 Mar 12
0
[PATCH] v2v: -o rhv-upload: Support zero requests.
...-plugin.py b/v2v/rhv-upload-plugin.py index 4f5ed2ac5..9ccb393f8 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -156,7 +156,6 @@ def open(readonly): 'disk': disk, 'disk_service': disk_service, 'failed': False, - 'highestwrite': 0, 'http': http, 'path': destination_url.path, 'transfer': transfer, @@ -189,14 +188,10 @@ def pread(h, count, offset): return r.read() def pwrite(h, buf, offset): + http = h['http'] + transfer=h['transfer'] +...
2018 Jun 29
0
Re: [PATCH] v2v: rhv-upload-plugin: Remove unneeded auth
..."bytes=%d-%d" % (offset, offset+count-1)} > - # Authorization is only needed for old imageio. > if h['needs_auth']: > headers["Authorization"] = transfer.signed_ticket > > @@ -321,7 +321,6 @@ def pwrite(h, buf, offset): > h['highestwrite'] = max(h['highestwrite'], offset+count) > > http.putrequest("PUT", h['path'] + "?flush=n") > - # Authorization is only needed for old imageio. > if h['needs_auth']: > http.putheader("Authorization", t...
2018 Jun 25
2
[PATCH] v2v: rhv-upload-plugin: Fix name error
http was missing in emulate_zero, so the code would fail with NameError. This can happen only when communicating with old imageio versions not supporting the "zero" feature. Testing with qemu-img 2.12 show that we never send emulated zero request because of the highestwrite mechanism, but it can break with older qemu-img-rhev used on RHEL. --- v2v/rhv-upload-plugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py index 2eec375f7..0f6b31e67 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py...
2018 Jun 06
2
[PATCH v2] v2v: -o rhv-upload: Log full imageio response on failure.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-June/msg00015.html v2 fixes all the issues raised in Nir's review. I tested it against ovirt-engine-4.2.4.1-1.el7.noarch and it works, although I wasn't easily able to trigger the error path so that code is not really tested (except for syntax checking). Rich.
2018 Jun 05
2
[PATCH] v2v: Log full imageio response on failure.
...d not read sector offset %d size %d" % + (offset, count)) return r.read() def pwrite(h, buf, offset): http = h['http'] transfer = h['transfer'] - transfer_service = h['transfer_service'] count = len(buf) h['highestwrite'] = max(h['highestwrite'], offset+count) @@ -275,15 +296,13 @@ def pwrite(h, buf, offset): r = http.getresponse() if r.status != 200: - transfer_service.pause() - h['failed'] = True - raise RuntimeError("could not write sector (%d, %d): %d:...
2018 Apr 10
1
Re: [Qemu-block] v2v: -o rhv-upload: Long time spent zeroing the disk
...qemu-img convert starts by trying to zero/trim the whole device. + # Since we've just created a new disk it's safe to ignore these + # requests as long as they are smaller than the highest write seen. + # After that we must emulate them with writes. + if offset+count < h['highestwrite']: Or is the problem that emulate_zero() is only being called if: + # Unlike the trim and flush calls, there is no 'can_zero' method + # so nbdkit could call this even if the server doesn't support + # zeroing. If this is the case we must emulate. + if not h['can...
2018 Dec 07
0
[PATCH] v2v: -o rhv-upload: Fix request headers in pread
...request_failed(h, r, "could not read sector offset %d size %d" % (offset, count)) return r.read() def pwrite(h, buf, offset): http = h['http'] transfer = h['transfer'] count = len(buf) h['highestwrite'] = max(h['highestwrite'], offset+count) -- 2.17.2
2018 Mar 24
4
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...and make it easier to understand what is the state managed by the plugin. [snipped] +def pwrite(h, buf, offset): > + http = h['http'] > + transfer=h['transfer'] > + transfer_service=h['transfer_service'] > + > + count = len(buf) > + h['highestwrite'] = max(h['highestwrite'], offset+count) > + > + http.putrequest("PUT", h['path'] + "?flush=n") > "?flush=n" has effect only if h["can_flush"] is True. Older daemon/proxy do not know support disabling flushing. The docs menti...
2018 Mar 25
0
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
.... Yup, strong typing FTW ... > [snipped] > > +def pwrite(h, buf, offset): > > + http = h['http'] > > + transfer=h['transfer'] > > + transfer_service=h['transfer_service'] > > + > > + count = len(buf) > > + h['highestwrite'] = max(h['highestwrite'], offset+count) > > + > > + http.putrequest("PUT", h['path'] + "?flush=n") > > > > "?flush=n" has effect only if h["can_flush"] is True. Older daemon/proxy > do not know support disa...
2018 Jun 06
0
[PATCH v2] v2v: -o rhv-upload: Log full imageio response on failure.
...;could not read sector offset %d size %d" % + (offset, count)) return r.read() def pwrite(h, buf, offset): http = h['http'] transfer = h['transfer'] - transfer_service = h['transfer_service'] count = len(buf) h['highestwrite'] = max(h['highestwrite'], offset+count) @@ -275,15 +299,13 @@ def pwrite(h, buf, offset): r = http.getresponse() if r.status != 200: - transfer_service.pause() - h['failed'] = True - raise RuntimeError("could not write sector (%d, %d): %d:...
2018 Dec 07
2
[PATCH] v2v: -o rhv-upload: Fix emulated zero
...qemu-img convert starts by trying to zero/trim the whole device. # Since we've just created a new disk it's safe to ignore these # requests as long as they are smaller than the highest write seen. # After that we must emulate them with writes. if offset+count < h['highestwrite']: http.putrequest("PUT", h['path']) if h['needs_auth']: http.putheader("Authorization", transfer.signed_ticket) http.putheader("Content-Range", "bytes %d-%d/*" % (offset, of...
2018 Jun 05
0
Re: [PATCH] v2v: Log full imageio response on failure.
...(offset, count)) > This is much nicer. > return r.read() > > def pwrite(h, buf, offset): > http = h['http'] > transfer = h['transfer'] > - transfer_service = h['transfer_service'] > > count = len(buf) > h['highestwrite'] = max(h['highestwrite'], offset+count) > @@ -275,15 +296,13 @@ def pwrite(h, buf, offset): > > r = http.getresponse() > if r.status != 200: > - transfer_service.pause() > - h['failed'] = True > - raise RuntimeError("cou...
2020 Jan 10
7
[v2v PATCH 0/6] Various Python pycodestyle fixes
Fixes the majority of the pycodestyle issues in the Python scripts, and fix the existing test-v2v-python-syntax.sh to use pycodestyle to actually perform style checks. Pino Toscano (6): PEP 8: adapt whitespaces in lines PEP 8: move imports at the top PEP 8: adapt empty lines tests: find all the Python scripts for syntax checks -o rhv-upload: remove unused Python imports Revamp check
2019 Sep 01
11
[nbdkit PATCH 00/10] Avoid -Wshadow
While working on can_FOO caching, at one point I got confused by whether 'readonly' meant the global set by -r or a local passed to .open(). A quick attempt to compile with -Wshadow found several other confusing points; this series gets us to the point that we can add -Wshadow to builds with --enable-gcc-warnings. Eric Blake (10): server: Avoid -Wshadow warnings guestfs: Avoid
2020 Jul 08
2
[PATCH] RFC: rhv-upload-plugin: Use imageio client
...': options['can_zero'], - 'needs_auth': options['needs_auth'], + 'client': client, 'connection': connection, 'disk_id': disk.id, 'transfer': transfer, 'failed': False, - 'highestwrite': 0, - 'http': http, - 'path': destination_url.path, } -@failing def can_trim(h): - return h['can_trim'] + # Imageio does not support trim. Image sparsness is controled on the server + # side. If transfer ticket["sparse"] is Tr...
2018 Mar 26
0
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...t; +def pwrite(h, buf, offset): >> > > + http = h['http'] >> > > + transfer=h['transfer'] >> > > + transfer_service=h['transfer_service'] >> > > + >> > > + count = len(buf) >> > > + h['highestwrite'] = max(h['highestwrite'], offset+count) >> > > + >> > > + http.putrequest("PUT", h['path'] + "?flush=n") >> > > >> > >> > "?flush=n" has effect only if h["can_flush"] is True. Olde...
2018 Jun 25
1
[PATCH v2] v2v: rhv-upload-plugin: Fix name error
...quot;transfer" variables were missing in emulate_zero, so the code would fail with NameError. This can happen only when communicating with old imageio versions not supporting the "zero" feature. Testing with qemu-img 2.12 show that we never send emulated zero request because of the highestwrite mechanism, but it can break with older qemu-img-rhev used on RHEL. --- v2v/rhv-upload-plugin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py index 2eec375f7..10887c031 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.p...
2018 Jun 25
0
Re: [PATCH] v2v: rhv-upload-plugin: Fix name error
...t; http was missing in emulate_zero, so the code would fail with NameError. > This can happen only when communicating with old imageio versions not > supporting the "zero" feature. > > Testing with qemu-img 2.12 show that we never send emulated zero request > because of the highestwrite mechanism, but it can break with older > qemu-img-rhev used on RHEL. > --- > v2v/rhv-upload-plugin.py | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py > index 2eec375f7..0f6b31e67 100644 > --- a/v2v/rhv-upload-p...