Displaying 6 results from an estimated 6 matches for "environmenterror".
2018 Jun 05
0
Re: [PATCH] v2v: Log full imageio response on failure.
...failed'] = True
> + h['transfer_service'].pause()
> +
> + status = r.status
> + reason = r.reason
> + body = r.read()
>
This should not fail, but if we there is a possible failure, it would be
more
robust to do:
try:
body = r.read()
except EnvironmentError as e:
body = "(Unable to read response body: %s)" % e
If this raises as is, we would fail with EnvironmentError, hiding
the status, reason, and msg.
> +
> + # Log the full error if we're verbose.
> + debug("unexpected response from imageio server:")...
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.
Thanks: Nir Soffer
---
v2v/rhv-upload-plugin.py | 66 ++++++++++++++++++++++++++++--------------------
1 file changed, 39 insertions(+), 27 deletions(-)
diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
index 791c9e7d2..c3de7d555 100644
--- a/v2v/rhv-upload-plugin.py
+++ b/v2v/rhv-upload-plugin.py
@@ -228,6 +228,29 @@ def can_flush(h):
def get_size(h):
return
2018 Jun 06
0
[PATCH v2] v2v: -o rhv-upload: Log full imageio response on failure.
...n.
+def request_failed(h, r, msg):
+ # Setting the failed flag in the handle causes the disk to be
+ # cleaned up on close.
+ h['failed'] = True
+ h['transfer_service'].pause()
+
+ status = r.status
+ reason = r.reason
+ try:
+ body = r.read()
+ except EnvironmentError as e:
+ body = "(Unable to read response body: %s)" % e
+
+ # Log the full error if we're verbose.
+ debug("unexpected response from imageio server:")
+ debug(msg)
+ debug("%d: %s" % (status, reason))
+ debug(body)
+
+ # Only a short error...
2020 Jul 08
2
[PATCH] RFC: rhv-upload-plugin: Use imageio client
...et size", e)
# Any unexpected HTTP response status from the server will end up calling this
# function which logs the full error, and raises a RuntimeError exception.
-def request_failed(r, msg):
- status = r.status
- reason = r.reason
- try:
- body = r.read()
- except EnvironmentError as e:
- body = "(Unable to read response body: %s)" % e
-
- # Log the full error if we're verbose.
+def request_failed(msg, reason):
+ error = "%s: %s" % (msg, reason)
debug("unexpected response from imageio server:")
- debug(msg)
- debug(&q...
2013 Jul 17
3
Help with filing a [maybe] ZFS/mmap bug.
Hi All,
I have what I think is a ZFS related bug. Unfortunately my simplest
test case is a bit cumbersome and I haven't definitively proven that
the problem is ZFS related.
I'm hoping for some feedback on how to move forward.
Quick background: I rip my CD's using grip and produce flac files. I
tag the music using Musicbrainz' Picard and transcode it to mp3's
within Picard