Richard W.M. Jones
2018-Aug-21 13:02 UTC
Re: [Libguestfs] [PATCH 1/2] v2v: rhv-upload-plugin: Handle send send failures
On Tue, Aug 21, 2018 at 03:55:50PM +0300, Nir Soffer wrote:> On Tue, Aug 21, 2018 at 2:49 PM Richard W.M. Jones <rjones@redhat.com> > wrote: > > It seems more likely that whatever version of nbdkit being used does > > not include: > > > > > > github.com/libguestfs/nbdkit/commit/72c0d64a47db642cafa89884f2ee554bd0b8e822 > > > > This has now been backported to the 1.2 & 1.4 branches as well. Do > > you know what version (of nbdkit) they are testing with? > > > > Tested with: > $ rpm -qa | grep nbdkit > nbdkit-plugin-python3-1.4.2-1.fc28.x86_64 > nbdkit-1.4.2-1.fc28.x86_64 > nbdkit-plugin-python-common-1.4.2-1.fc28.x86_64I think if you upgrade to 1.4.3 (which is still in testing in Fedora) you should get full tracebacks. bodhi.fedoraproject.org/updates/FEDORA-2018-92ee422873 (see "python" here: github.com/libguestfs/nbdkit/commits/stable-1.4 ) Rich. -- Richard Jones, Virtualization Group, Red Hat people.redhat.com/~rjones Read my programming and virtualization blog: rwmj.wordpress.com virt-builder quickly builds VMs from scratch libguestfs.org/virt-builder.1.html
Nir Soffer
2018-Aug-21 19:47 UTC
Re: [Libguestfs] [PATCH 1/2] v2v: rhv-upload-plugin: Handle send send failures
On Tue, Aug 21, 2018 at 4:03 PM Richard W.M. Jones <rjones@redhat.com> wrote:> On Tue, Aug 21, 2018 at 03:55:50PM +0300, Nir Soffer wrote: > > On Tue, Aug 21, 2018 at 2:49 PM Richard W.M. Jones <rjones@redhat.com> > > wrote: > > > It seems more likely that whatever version of nbdkit being used does > > > not include: > > > > > > > > > > github.com/libguestfs/nbdkit/commit/72c0d64a47db642cafa89884f2ee554bd0b8e822 > > > > > > This has now been backported to the 1.2 & 1.4 branches as well. Do > > > you know what version (of nbdkit) they are testing with? > > > > > > > Tested with: > > $ rpm -qa | grep nbdkit > > nbdkit-plugin-python3-1.4.2-1.fc28.x86_64 > > nbdkit-1.4.2-1.fc28.x86_64 > > nbdkit-plugin-python-common-1.4.2-1.fc28.x86_64 > > I think if you upgrade to 1.4.3 (which is still in testing in Fedora) > you should get full tracebacks. > > bodhi.fedoraproject.org/updates/FEDORA-2018-92ee422873 > (see "python" here: > github.com/libguestfs/nbdkit/commits/stable-1.4 ) >After upgrading from update-testing repo: $ rpm -qa | grep nbdkit nbdkit-plugin-python3-1.4.3-1.fc28.x86_64 nbdkit-plugin-python-common-1.4.3-1.fc28.x86_64 nbdkit-1.4.3-1.fc28.x86_64 Here is output when simulating expired ticket in verbose mode. unexpected response from imageio server: could not write sector offset 1897857024 size 65536 403: Forbidden b'{"explanation": "Access was denied to this resource.", "code": 403, "detail": "Ticket u\'acdad591-f29e-4d85-bf41-046e250aa015\' expired", "title": "Forbidden"}' nbdkit: python[1]: error: /home/nsoffer/src/libguestfs/tmp/v2v.ayEM8r/rhv-upload-plugin.py: pwrite: error: ['Traceback (most recent call last):\n', ' File "/home/nsoffer/src/libguestfs/tmp/v2v.ayEM8r/rhv-upload-plugin.py", line 373, in pwrite\n (offset, count))\n', ' File "/home/nsoffer/src/libguestfs/tmp/v2v.ayEM8r/rhv-upload-plugin.py", line 321, in request_failed\n raise RuntimeError("%s: %d %s: %r" % (msg, status, reason, body[:200]))\n', 'RuntimeError: could not write sector offset 1897857024 size 65536: 403 Forbidden: b\'{"explanation": "Access was denied to this resource.", "code": 403, "detail": "Ticket u\\\'acdad591-f29e-4d85-bf41-046e250aa015\\\' expired", "title": "Forbidden"}\'\n'] nbdkit: python[1]: debug: sending error reply: Input/output error qemu-img: error while writing sector 3706752: Input/output error Nir
Richard W.M. Jones
2018-Aug-22 09:45 UTC
Re: [Libguestfs] [PATCH 1/2] v2v: rhv-upload-plugin: Handle send send failures
On Tue, Aug 21, 2018 at 10:47:01PM +0300, Nir Soffer wrote:> Here is output when simulating expired ticket in verbose mode. > > unexpected response from imageio server: > could not write sector offset 1897857024 size 65536 > 403: Forbidden > b'{"explanation": "Access was denied to this resource.", "code": 403, > "detail": "Ticket u\'acdad591-f29e-4d85-bf41-046e250aa015\' expired", > "title": "Forbidden"}' > nbdkit: python[1]: error: > /home/nsoffer/src/libguestfs/tmp/v2v.ayEM8r/rhv-upload-plugin.py: pwrite: > error: ['Traceback (most recent call last):\n', ' File > "/home/nsoffer/src/libguestfs/tmp/v2v.ayEM8r/rhv-upload-plugin.py", line > 373, in pwrite\n (offset, count))\n', ' File > "/home/nsoffer/src/libguestfs/tmp/v2v.ayEM8r/rhv-upload-plugin.py", line > 321, in request_failed\n raise RuntimeError("%s: %d %s: %r" % (msg, > status, reason, body[:200]))\n', 'RuntimeError: could not write sector > offset 1897857024 size 65536: 403 Forbidden: b\'{"explanation": "Access was > denied to this resource.", "code": 403, "detail": "Ticket > u\\\'acdad591-f29e-4d85-bf41-046e250aa015\\\' expired", "title": > "Forbidden"}\'\n'] > nbdkit: python[1]: debug: sending error reply: Input/output error > qemu-img: error while writing sector 3706752: Input/output errorGiven the limitation of having to have a single line output in the error message, this seems like it's doing the right thing to me. You can (painfully) rewrite the error message to make it look like the original: Traceback (most recent call last): File "/home/nsoffer/src/libguestfs/tmp/v2v.ayEM8r/rhv-upload-plugin.py", line 373, in pwrite (offset, count)) File "/home/nsoffer/src/libguestfs/tmp/v2v.ayEM8r/rhv-upload-plugin.py", line 321, in request_failed raise RuntimeError("%s: %d %s: %r" % (msg, status, reason, body[:200])) RuntimeError: could not write sector offset 1897857024 size 65536: 403 Forbidden: b{"explanation": "Access was denied to this resource.", "code": 403, "detail": "Ticket u'acdad591-f29e-4d85-bf41-046e250aa015' expired", "title": "Forbidden"} So it looks like all the information is still there, particularly about the expired ticket. Thanks for testing this, Rich. -- Richard Jones, Virtualization Group, Red Hat people.redhat.com/~rjones Read my programming and virtualization blog: rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. fedoraproject.org/wiki/MinGW
Maybe Matching Threads
- Re: [PATCH 1/2] v2v: rhv-upload-plugin: Handle send send failures
- Re: [PATCH 1/2] v2v: rhv-upload-plugin: Handle send send failures
- Re: [PATCH 1/2] v2v: rhv-upload-plugin: Handle send send failures
- Re: [PATCH] rhv-upload: Fix waiting for transfer
- [PATCH] rhv-upload: Handle any error in NBD handlers